Skip to content
Tutorials Center
My learning

Topics

Lesson 10 of 49 ยท Biological Data and Databases

Chapter 2 review: biological data and databases

Review chapter 2 with a one-page recap of databases, file formats and Phred quality scores, plus a ten-question quiz and two practice tools.

Chapter 2 gave you the practical vocabulary of biological data. You can now say where a sequence comes from, name the file that holds it, read coordinates without being off by one and tell how far to trust a base. This review puts those pieces side by side, so you can spot the connections: a FASTQ read is a quality-scored piece of what will become a sequence in an archive, and a GFF3 feature points into that sequence.

Three cards: databases, file formats and read quality
Caption: the chapter on one page: where data lives, what format it comes in and how reliable each base is.

What you will learn

  • A one-table recap of databases, formats and quality.
  • The mistakes that cost the most time in practice.
  • Whether you are ready for sequence alignment in chapter 3.

The chapter in one table

Topic Key facts
INSDC GenBank, ENA and DDBJ exchange records daily; they archive what is submitted
RefSeq Curated reference sequences; prefixes NC_, NM_, NR_, NP_, XM_, XP_
UniProt Swiss-Prot is expert-reviewed; TrEMBL is automatic
Accession and version Accession is stable; version changes when the sequence changes; always cite both
Genome build GRCh37, GRCh38, T2T-CHM13: coordinates differ between builds
FASTA / FASTQ Sequences / reads with one quality character per base, four lines per record
GFF3 / VCF 1-based, inclusive (VCF positions are 1-based)
BED 0-based, half-open; seq[start:end] in Python
Phred Q = -10 log10(p); Q20 = 99%, Q30 = 99.9%; character code = Q + 33
Averaging Average error probabilities, then convert back to Q

Worked review problems

Try these by hand, then check the answers.

  1. Quality arithmetic. A read has bases with qualities 30, 30, 20 and 10. Their error probabilities are 0.001, 0.001, 0.01 and 0.1, which sum to 0.112, so the read is expected to contain about 0.11 errors in these four bases. The mean probability is 0.028, which corresponds to Q of about 15.5, much lower than the arithmetic mean of the scores (22.5).
  2. Coordinates. A GFF3 exon is given as 1,201 to 1,500. In BED the same exon is 1200 1500, its length is 300, and the Python slice is seq[1200:1500].
  3. Which resource? You want the curated mRNA reference for a human gene (RefSeq, an NM_ record), the reviewed function of its protein (Swiss-Prot) and its 3D structure (the PDB). Three questions, three resources, and in a report you would cite each accession with its version.

If the last answer was not immediate, reread the database lesson and its table of prefixes.

Where people go wrong

  • Treating GenBank as a curated reference. Use RefSeq or Swiss-Prot when curation matters.
  • Mixing coordinate systems. One base off is almost always a 0-based versus 1-based problem.
  • Skipping quality control. Inspect read quality before mapping, not after a strange result.
  • Forgetting provenance. Write down accessions, versions, builds and tool versions.

Try it

Python Self-check: formats, coordinates and quality

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Match the resource

Check your understanding

Quick check ยท 10 questions

of 10 answered You scored / 10 ยท perfect!

  1. 1. Which prefix marks a curated RefSeq protein record?

    NP_ is a curated RefSeq protein; NM_ is mRNA, NC_ a genomic molecule and XM_ a predicted mRNA.
  2. 2. What is the difference between an accession and its version?

    The accession identifies the record for life; the version identifies the exact sequence.
  3. 3. A VCF record has POS 12345. What does that position mean?

    VCF positions are 1-based.
  4. 4. Which Python slice extracts BED interval chr1 100 220 from a sequence string?

    BED is 0-based and half-open, which is exactly Python's slice convention.
  5. 5. What is the Phred quality of a base with error probability 0.01?

    Q = -10 log10(0.01) = 20.
  6. 6. Which FASTQ character corresponds to Q40 in Phred+33?

    40 + 33 = 73, the ASCII code of I.
  7. 7. Why average error probabilities rather than Q values?

    Because Q is logarithmic, an arithmetic mean of Q overstates quality when a few bases are bad.
  8. 8. What does UniProt's Swiss-Prot section provide?

    Swiss-Prot entries are manually reviewed; TrEMBL entries are computer-annotated.
  9. 9. Which is the best reason to record the genome build with a variant?

    Coordinates are only meaningful relative to a specific assembly.
  10. 10. How many lines are in each FASTQ record?

    Header, sequence, plus line and quality string make four lines.

Summary

  • Archives store submissions; curated resources add review and annotation; always cite accession, version and build.
  • FASTA, FASTQ, GFF3, BED and VCF each have a purpose, and coordinate conventions differ.
  • Phred scores encode per-base error probabilities; average probabilities and trim with care.
  • Next you will compare sequences by alignment, using the formats and quality ideas from this chapter.

Next: Chapter 3 overview: sequence alignment