Bioinformatics, step by step · Workshop
Module F · The files of an RNA-seq experiment
Videos: F1–F4 (how sequencing works: Sanger to NGS, library preparation, clusters, sequencing by synthesis),
F5 FASTQ files and quality scores, F6 Reference files: FASTA and GTF, F7 Alignment, SAM and BAM, F8 The pipeline. Script: scripts/00b_files_and_formats.R
(base R, nothing to install)
Goal. Open every kind of file by hand, before any tool hides it from you. All the data are real: the first 10,000 read pairs of sample SRR6068402 (from ENA), and the gene Pkm from Ensembl release 99 (GRCm38).
file in data/foundations/ |
what it is |
|---|---|
SRR6068402_1.first10k.fastq, SRR6068402_2.first10k.fastq |
read 1 and read 2 of the first 10,000 pairs |
Pkm_transcripts.fa |
the cDNA sequences of all Pkm transcripts (Ensembl 99) |
Pkm.gtf |
all GTF lines for Pkm (Ensembl 99) |
A–B. FASTQ and quality scores
QF.1 How long are the reads? Are the two files in the same order? How do you know?
QF.2 Decode the first 10 quality characters of the first read into Phred scores and error probabilities. What is special about the first letter?
QF.3 Which quality characters occur at all? Why so few? (Hint: video F5, "binned".)
QF.4 Plot the mean quality per position for read 1 and read 2. What share of letters is ≥ Q30? Would you trim these reads?
C. Paired-end overlap
QF.5 The first pair overlaps by how many letters? How long was its fragment? (Video F4 shows why.)
QF.6 (Exercise C1) What share of the first 500 pairs overlap? What does that say about the fragment lengths of this library, compared with the read length of 2 × 101?
D–E. FASTA and GTF
QF.7 How many Pkm transcripts are in the FASTA file, and how long is each? Read the header of the first one field by field.
QF.8 In the GTF, how many transcripts does Pkm have, and of which biotypes? Compare with the 9 Pkm transcripts in
data/mart_export.txt. Why the difference?QF.9 Draw the transcripts. Which exons are shared by all the protein-coding transcripts?
F. SAM fields by hand
QF.10 Decode flags 99, 147 and 83 with
decode_flag(). Which of them could be the two mates of one pair?QF.11 For the CIGAR strings
150M,75M1I74Mand82M406N19M, how many letters does the read have, and how many reference bases does the alignment cover? Why are the two numbers different?QF.12 (thinking) The workshop data were made with kallisto, which does not write a BAM file. Name one thing you can do with a BAM file that you cannot do with kallisto's
abundance.tsv.