eduKateSG · Why Science?
Read a biological sequence as a named scientific record—then preserve the alphabet, reference edition and provenance that give every letter meaning
Choose the closest route, then return to the full index whenever you need the wider evidence chain.
Science learning becomes powerful when students can tell a measured pattern from a model, a statistical decision from a mechanism, and a useful lead from a finished conclusion. FASTA is a plain-text way to represent biological sequences. Each record begins with a definition line whose first character is >, followed by an identifier and, where supported, a description; subsequent lines contain sequence symbols. NCBI submission guidance requires a unique SeqID for each nucleotide sequence and recommends IUPAC symbols, while software tools can apply additional naming and wrapping rules. A readable sequence is not automatically the correct reference, complete, biologically validated or interchangeable with another file carrying a similar name. This guide supports Primary Science, PSLE Science, Secondary Science, O-Level Science and STEM education as a longform evidence-reading route; it is not medical advice, a laboratory protocol, an admission promise or a career guarantee.
Related eduKate reading: refget and globally identifiable reference sequences; SAM and human-readable sequence alignments; VCF and structured variant call records; Science Learning Hub; Education Hub; STEM Education; Careers by Subject Capability.
Primary and official sources checked on 12 October 2026: NCBI FASTA format guidance for nucleotide sequence submissions, updated 18 June 2025; NCBI BLAST query-input documentation for FASTA sequence input; Official HTSlib faidx manual for indexable FASTA and FASTQ files; 2026 Singapore–Cambridge O-Level Biology syllabus; MOE G2/G3 Lower Secondary Science teaching and learning syllabus; 2026 MOE G2 Computing syllabus. Specifications, tools and recommendations can change, so preserve the dated documentation, exact source bytes, parser rules and software versions used.
A deeper reading route
FASTA separates identity from sequence content with one beautifully simple marker. The definition line introduces a record; the following letters continue until another definition line or the end of the file. That simplicity makes FASTA useful across laboratories and software, but it also means many important facts—organism, assembly, molecule type, coordinate system and release—must be supplied by identifiers, descriptions or companion metadata.
The identifier contract depends on context. NCBI submission guidance says the definition line begins with > followed by a unique SeqID and places structured source modifiers after it. HTSlib faidx, by contrast, uses the first word after > as the indexed name. A space that looks harmless to a person can therefore separate the name from the description for one tool. Pipelines should test the actual parser instead of assuming every consumer reads the whole line as one identifier.
The sequence alphabet matters. Nucleotide FASTA can use IUPAC symbols to represent standard and ambiguous bases; protein FASTA uses amino-acid symbols. Lowercase may be used by some resources to mark soft-masked sequence, yet case handling is a workflow convention rather than a universal biological truth. Validation needs the declared molecule type, allowed alphabet and policy for gaps, ambiguity and masking.
Line wrapping changes bytes without necessarily changing the biological sequence. NCBI recommends nucleotide sequence lines no longer than 80 characters for submission, while indexable FASTA under faidx requires consistent line length within each sequence except the final line. Unix and Windows newline conventions also change byte offsets. A checksum of the whole file therefore answers a different question from a checksum of a normalised sequence.
A reference FASTA is more than a convenient lookup table. Alignment, variant calling and annotation can all depend on the exact contig sequences and their names. Two files labelled with the same assembly name may differ in alternate contigs, decoys, masking, line wrapping or local edits. Lengths, sequence digests and stable identifiers make the dependency explicit.
Transformations deserve receipts. Rewrapping, renaming, filtering contigs, converting case or replacing non-standard symbols may be reasonable, but every change can affect indexes, coordinate dictionaries or reproducibility. Keep the original hash, transformation command, output hash and a record-level comparison so another researcher can distinguish byte changes from sequence changes.
Interoperability should be demonstrated with fixtures rather than inferred from the extension. One reader may preserve the complete description while another uses the first word as its name; one may retain case while another normalises it; one may accept an empty sequence while another refuses it. A compact test collection should include multiple records, ambiguity symbols, mixed description styles, a short final line and a known digest. Running that collection through every production consumer reveals where conventions diverge before a real reference is silently altered.
Long-term stewardship also requires a recovery test. Store the reference manifest and hashes somewhere independent of the analysis workstation, then rebuild indexes and retrieve known intervals in a clean environment. This checks that the archive contains the actual sequence dependency rather than a path pointing to a vanished local cache. Recovery is the practical proof that today’s readable text will remain usable evidence tomorrow.
For students, FASTA is a friendly first encounter with scientific data structures. A heading names the specimen and a string records its sequence. The deeper lesson is that a list of letters becomes evidence only when the alphabet, source, edition and limits are visible. That habit transfers directly to Primary Science observations, Secondary Science measurements and later STEM work.
| Stage | Question | Evidence | Responsible output |
|---|---|---|---|
| Identify | Which sequence record is this? | Definition line, stable ID and source metadata | An unambiguous record identity |
| Read | Which symbols and molecule rules apply? | Declared alphabet, ambiguity and masking policy | A valid sequence string |
| Bind | Which reference edition is intended? | Contig set, lengths, digests and release | A reproducible reference |
| Verify | Did transfer or transformation preserve meaning? | Hashes, counts and sequence-level comparisons | A trustworthy FASTA dataset |
Inside this guide
1–12 · Foundations and design
- 1. Start with the sequence question
- 2. Recognise the record boundary
- 3. Read the definition line
- 4. Use unique identifiers
- 5. Separate identifier from description
- 6. Keep structured source metadata
- 7. Declare nucleotide or protein
- 8. Use an explicit alphabet
- 9. Treat ambiguity honestly
- 10. Treat case as a convention
- 11. Handle gaps by context
- 12. Wrap lines deliberately
13–24 · Models and estimation
- 13. Keep newlines consistent
- 14. Check indexable line lengths
- 15. Count records and lengths
- 16. Detect duplicate names
- 17. Preserve record order
- 18. Bind contig names to sequences
- 19. Use sequence digests
- 20. Connect to refget
- 21. Build a FASTA index carefully
- 22. Do not confuse FASTA with FASTQ
- 23. Do not confuse format with algorithm
- 24. Validate compression separately
25–36 · Diagnostics and interpretation
- 25. Test subsequence retrieval
- 26. Track transformations
- 27. Protect sensitive sequences
- 28. Connect to Primary Science
- 29. Connect to Secondary Science
- 30. Connect to mathematics
- 31. Connect to computing
- 32. Connect to pathways
- 33. Did you know?
- 34. Write a reader-ready reference note
- 35. Build a validation ladder
- 36. Finish with a reproducible bundle
Section 1 of 36
1. Start with the sequence question
A FASTA file can hold a genome, transcript, amplicon, protein collection or teaching example. Interpretation begins by naming the molecule, organism, source and intended analysis.
Working checkpoint — FASTA: Write the biological question and reference edition before opening the file. Keep source, assembly release, file hash, sequence digests, manifest, transformations and index together.
For a classroom model, use invented sequences and a declared alphabet.
Section 2 of 36
2. Recognise the record boundary
Each FASTA record starts when a line begins with the greater-than character. Sequence lines continue until the next definition line or end of file.
Working checkpoint — definition line: Reject sequence text that appears before the first valid definition line. Read every identifier beside molecule type, organism, contig set and exact sequence content.
For future study, connect molecular biology to strings, hashes and databases while checking pathways separately.
Section 3 of 36
3. Read the definition line
The text after > carries an identifier and may carry a description. Different repositories and tools impose different rules on that text.
Working checkpoint — sequence identifier: Preserve the full line while documenting which portion becomes the operational name. Preserve ambiguous symbols and excluded records; a clean-looking subset is not the original reference.
For scientific writing, report reference identity, symbols, transformations and validation.
Section 4 of 36
4. Use unique identifiers
NCBI nucleotide submission guidance requires a unique SeqID per sequence and restricts its syntax and length for that submission context.
Working checkpoint — IUPAC alphabet: Validate identifiers against the destination rather than a vague universal rule. Separate byte equality, sequence equality, assembly equivalence and biological interpretation.
For students, ask what turns a string of letters into a traceable scientific record.
Section 5 of 36
5. Separate identifier from description
HTSlib faidx uses the first word of a FASTA header as the indexed NAME. Later words remain descriptive text for that parser.
Working checkpoint — reference sequence: Test whitespace and duplicate first words before indexing. Treat alphabet, masking, names and order as scientific inputs: silent normalisation can change downstream results.
For parents, ask whether reference edition and source are visible beside the result.
Section 6 of 36
6. Keep structured source metadata
NCBI submission examples place bracketed source modifiers after the SeqID, including organism and optional strain or chromosome information.
Working checkpoint — line wrapping: Validate required modifiers for the relevant submission workflow. Keep source, assembly release, file hash, sequence digests, manifest, transformations and index together.
For a classroom model, use invented sequences and a declared alphabet.
Section 7 of 36
7. Declare nucleotide or protein
The same container idea can carry nucleotides or amino acids, but the valid symbols and scientific interpretations differ.
Working checkpoint — FASTA: Record molecule type in the dataset manifest. Read every identifier beside molecule type, organism, contig set and exact sequence content.
For future study, connect molecular biology to strings, hashes and databases while checking pathways separately.
Section 8 of 36
8. Use an explicit alphabet
NCBI nucleotide guidance recommends IUPAC symbols and N for ambiguous nucleotide positions in unaligned sequence submissions.
Working checkpoint — definition line: Reject or explain every symbol outside the declared alphabet. Preserve ambiguous symbols and excluded records; a clean-looking subset is not the original reference.
For scientific writing, report reference identity, symbols, transformations and validation.
Section 9 of 36
9. Treat ambiguity honestly
An ambiguous base symbol records limited information; it is not a sequencing error estimate or an invitation to choose a favourite base.
Working checkpoint — sequence identifier: Preserve ambiguity through transformations and quantify it separately. Separate byte equality, sequence equality, assembly equivalence and biological interpretation.
For students, ask what turns a string of letters into a traceable scientific record.
Section 10 of 36
10. Treat case as a convention
Some reference resources use lowercase to mark soft-masked sequence. Other tools normalise case and erase that signal.
Working checkpoint — IUPAC alphabet: Declare whether case is meaningful before converting it. Treat alphabet, masking, names and order as scientific inputs: silent normalisation can change downstream results.
For parents, ask whether reference edition and source are visible beside the result.
Section 11 of 36
11. Handle gaps by context
Hyphens can appear in aligned sequence conventions, while NCBI says not to use ? or – for sequences not contained within an alignment submission.
Working checkpoint — reference sequence: Distinguish raw sequence, alignment and repository rules. Keep source, assembly release, file hash, sequence digests, manifest, transformations and index together.
For a classroom model, use invented sequences and a declared alphabet.
Section 12 of 36
12. Wrap lines deliberately
Sequence letters may be wrapped across lines; NCBI recommends lines no longer than 80 characters for nucleotide submission. Wrapping is presentation until byte indexing is involved.
Working checkpoint — line wrapping: Record the wrap width and normalise only with a documented reason. Read every identifier beside molecule type, organism, contig set and exact sequence content.
For future study, connect molecular biology to strings, hashes and databases while checking pathways separately.
Section 13 of 36
13. Keep newlines consistent
Unix LF and Windows CRLF terminators create different byte widths. faidx permits different styles but requires consistency within an indexed sequence.
Working checkpoint — FASTA: Detect mixed line endings before building byte-offset indexes. Preserve ambiguous symbols and excluded records; a clean-looking subset is not the original reference.
For scientific writing, report reference identity, symbols, transformations and validation.
Section 14 of 36
14. Check indexable line lengths
For samtools faidx, every sequence line within one record must have the same number of bases except the final shorter line.
Working checkpoint — definition line: Validate LINEBASES and LINEWIDTH assumptions on the whole record. Separate byte equality, sequence equality, assembly equivalence and biological interpretation.
For students, ask what turns a string of letters into a traceable scientific record.
Section 15 of 36
15. Count records and lengths
A manifest should list sequence names, lengths and overall counts. These simple quantities reveal truncation, duplication and unexpected contigs.
Working checkpoint — sequence identifier: Compare the manifest with authoritative release metadata. Treat alphabet, masking, names and order as scientific inputs: silent normalisation can change downstream results.
For parents, ask whether reference edition and source are visible beside the result.
Section 16 of 36
16. Detect duplicate names
Two definition lines can carry different descriptions yet share the same first word used by an indexer. Regional retrieval may then become ambiguous.
Working checkpoint — IUPAC alphabet: Require uniqueness under the exact parser naming rule. Keep source, assembly release, file hash, sequence digests, manifest, transformations and index together.
For a classroom model, use invented sequences and a declared alphabet.
Section 17 of 36
17. Preserve record order
Some workflows use FASTA order to establish a reference dictionary or display order. Resorting names can change downstream numeric reference IDs.
Working checkpoint — reference sequence: Treat order changes as transformations, not harmless tidying. Read every identifier beside molecule type, organism, contig set and exact sequence content.
For future study, connect molecular biology to strings, hashes and databases while checking pathways separately.
Section 18 of 36
18. Bind contig names to sequences
Names such as chr1, 1 or an accession are labels, not proofs of sequence identity. Similar labels can refer to different assemblies or patches.
Working checkpoint — line wrapping: Store lengths and sequence digests with every name. Preserve ambiguous symbols and excluded records; a clean-looking subset is not the original reference.
For scientific writing, report reference identity, symbols, transformations and validation.
Section 19 of 36
19. Use sequence digests
A digest of canonical sequence content can identify the underlying letters independently of wrapping, while a file hash identifies exact bytes.
Working checkpoint — FASTA: Keep both when preservation and interoperability matter. Separate byte equality, sequence equality, assembly equivalence and biological interpretation.
For students, ask what turns a string of letters into a traceable scientific record.
Section 20 of 36
20. Connect to refget
GA4GH refget uses digest-based sequence identifiers to make reference sequence identity and retrieval explicit. It complements rather than replaces local provenance.
Working checkpoint — definition line: Verify fetched sequence length and digest before use. Treat alphabet, masking, names and order as scientific inputs: silent normalisation can change downstream results.
For parents, ask whether reference edition and source are visible beside the result.
Section 21 of 36
21. Build a FASTA index carefully
A .fai file records names, lengths, byte offsets and line geometry so software can calculate where a requested region begins.
Working checkpoint — sequence identifier: Regenerate the index after any byte-level FASTA change. Keep source, assembly release, file hash, sequence digests, manifest, transformations and index together.
For a classroom model, use invented sequences and a declared alphabet.
Section 22 of 36
22. Do not confuse FASTA with FASTQ
FASTA stores named sequences, while FASTQ also pairs sequence symbols with per-symbol quality characters. Similar initials do not imply identical records.
Working checkpoint — IUPAC alphabet: Choose the format that matches the evidence actually available. Read every identifier beside molecule type, organism, contig set and exact sequence content.
For future study, connect molecular biology to strings, hashes and databases while checking pathways separately.
Section 23 of 36
23. Do not confuse format with algorithm
FASTA is also the name of a sequence-search software family. A FASTA-formatted file does not state which comparison algorithm was used.
Working checkpoint — reference sequence: Name both the data format and analysis tool precisely. Preserve ambiguous symbols and excluded records; a clean-looking subset is not the original reference.
For scientific writing, report reference identity, symbols, transformations and validation.
Section 24 of 36
24. Validate compression separately
A FASTA may be distributed compressed. The compression container, indexes and random-access capabilities have their own contracts.
Working checkpoint — line wrapping: Check decompression integrity and companion index freshness. Separate byte equality, sequence equality, assembly equivalence and biological interpretation.
For students, ask what turns a string of letters into a traceable scientific record.
Section 25 of 36
25. Test subsequence retrieval
Known intervals should return expected letters at chromosome starts, internal boundaries and sequence ends. Off-by-one errors often hide in interface conversions.
Working checkpoint — FASTA: Compare indexed retrieval with a direct full-record slice. Treat alphabet, masking, names and order as scientific inputs: silent normalisation can change downstream results.
For parents, ask whether reference edition and source are visible beside the result.
Section 26 of 36
26. Track transformations
Renaming, filtering, concatenating, rewrapping, masking and case conversion can all change downstream interpretation or indexes.
Working checkpoint — definition line: Publish commands and before-after manifests. Keep source, assembly release, file hash, sequence digests, manifest, transformations and index together.
For a classroom model, use invented sequences and a declared alphabet.
Section 27 of 36
27. Protect sensitive sequences
Plain text does not make human or pathogen sequences harmless to share. Access, consent, security and policy remain separate responsibilities.
Working checkpoint — sequence identifier: Classify data before distributing it. Read every identifier beside molecule type, organism, contig set and exact sequence content.
For future study, connect molecular biology to strings, hashes and databases while checking pathways separately.
Section 28 of 36
28. Connect to Primary Science
A labelled string of coloured symbols can model how observations are recorded under a declared key.
Working checkpoint — IUPAC alphabet: Use invented sequences and ask pupils to find ambiguous symbols. Preserve ambiguous symbols and excluded records; a clean-looking subset is not the original reference.
For scientific writing, report reference identity, symbols, transformations and validation.
Section 29 of 36
29. Connect to Secondary Science
FASTA connects DNA and protein concepts to evidence handling: a sequence must be tied to organism, molecule, method and reference edition.
Working checkpoint — reference sequence: Separate observed sequence from inferred function. Separate byte equality, sequence equality, assembly equivalence and biological interpretation.
For students, ask what turns a string of letters into a traceable scientific record.
Section 30 of 36
30. Connect to mathematics
String length, indexing, offsets, hashes and edit distance connect sequences to discrete mathematics.
Working checkpoint — line wrapping: Calculate one subsequence interval and verify its length. Treat alphabet, masking, names and order as scientific inputs: silent normalisation can change downstream results.
For parents, ask whether reference edition and source are visible beside the result.
Section 31 of 36
31. Connect to computing
Streaming parsers, delimiters, encodings, checksums and random access make FASTA a compact systems lesson.
Working checkpoint — FASTA: Test empty records, duplicate names and malformed symbols. Keep source, assembly release, file hash, sequence digests, manifest, transformations and index together.
For a classroom model, use invented sequences and a declared alphabet.
Section 32 of 36
32. Connect to pathways
Reference sequences connect molecular biology, bioinformatics, software engineering and data stewardship and can illuminate STEM pathways.
Working checkpoint — definition line: Check current official qualifications separately. Read every identifier beside molecule type, organism, contig set and exact sequence content.
For future study, connect molecular biology to strings, hashes and databases while checking pathways separately.
Section 33 of 36
33. Did you know?
Changing only line wrapping can change a FASTA file hash and every faidx byte offset while leaving the concatenated biological sequence unchanged.
Working checkpoint — sequence identifier: Report whether equality was bytewise or sequence-wise. Preserve ambiguous symbols and excluded records; a clean-looking subset is not the original reference.
For scientific writing, report reference identity, symbols, transformations and validation.
Section 34 of 36
34. Write a reader-ready reference note
Name organism, assembly and release, source URL, contig set, alphabet, masking, wrap width, file hash, sequence digests and any edits.
Working checkpoint — IUPAC alphabet: Keep the manifest beside the FASTA and its index. Separate byte equality, sequence equality, assembly equivalence and biological interpretation.
For students, ask what turns a string of letters into a traceable scientific record.
Section 35 of 36
35. Build a validation ladder
Check definition lines, unique operational names, alphabet, lengths, newlines, line geometry, digests, index and known subsequences.
Working checkpoint — reference sequence: Stop at the earliest unexplained mismatch. Treat alphabet, masking, names and order as scientific inputs: silent normalisation can change downstream results.
For parents, ask whether reference edition and source are visible beside the result.
Section 36 of 36
36. Finish with a reproducible bundle
Deliver original and transformed hashes, manifests, exact commands, index, validation logs and reference identifiers.
Working checkpoint — line wrapping: Make every downstream coordinate traceable to exact sequence content. Keep source, assembly release, file hash, sequence digests, manifest, transformations and index together.
For a classroom model, use invented sequences and a declared alphabet.
Contents · Previous section · Continue to the Science Learning Hub
