What is FASTA?
FASTA is a simple text format used to store biological sequences. Each record contains a description line, called a header, followed by one or more lines of sequence data. FASTA files commonly use the extensions .fasta, .fa, or .faa.
Quick rule: Every record must begin with a greater-than symbol (>) and a non-empty identifier. Keep sequence lines free of spaces and numbers.
Basic file structure
A minimal FASTA record has two parts. The first line starts with >; everything after it is the sequence label and optional description. The sequence begins on the next line.
>human_insulin_chain_b FVNQHLCGSHLVEALYLVCGERGFFYTPKTRREAEDLQVGQVELGGGPGAGSLQPLALEGSLQ
A file can contain multiple records. Start each new record with its own header line.
>sample_alpha ACGTACGTACGTACGT >sample_beta GGCCTTAAGGCC
Sequence alphabets
Use the alphabet that matches your sequence type. The generator uses these standard symbols when creating a random sequence.
| Type | Common symbols | Typical extension |
|---|---|---|
| DNA | A, C, G, T | .fasta or .fa |
| RNA | A, C, G, U | .fasta or .fna |
| Protein | 20 standard amino-acid letters | .faa |
Some tools also accept ambiguity codes such as N for an unknown nucleotide or X for an unknown amino acid. Check the requirements of the downstream tool before including them.
Best practices
- Use short, unique labels without spaces. Underscores and hyphens are broadly compatible.
- Wrap sequence lines at 60 characters for readability and compatibility with many command-line tools.
- Keep one sequence record per logical sample, and avoid adding comments inside sequence data.
- Save the file as plain text using UTF-8 encoding, not as a rich text document.
- Verify that DNA uses T and RNA uses U before analysis.