...
| Warning | ||
|---|---|---|
When following along here, please start an idev session for running any example commands:
|
Illumina sequence data format (FASTQ)
GSAF gives you paired end sequencing data in two matching fastq format files, contining reads for each end sequenced -- for example Sample_ABC_L005_R1.cat.fastq and Sample_ABC_L005_R2.cat.fastq. Each read end sequenced is representd by a 4-line entry in the fastq file.
...
See the Wikipedia FASTQ format page for more information.
Exercise: Examine the 2nd sequence in a FASTQ file
What is the 2nd sequence in the file
Get your data
To try out exercises, we've provided some sample data on lonestar.
So, go get it!
| Code Block | ||
|---|---|---|
| ||
cds mkdir my_rnaseq_course #this is where you'll be doing all the course exercises cd my_rnaseq_course cp -r /corral-repl/utexas/BioITeam/ |
...
rnaseq_course_2015/ |
...
fastqc_exercise .
cd fastqc_exercise
ls data |
Exercise: Examine the 2nd sequence in a FASTQ file
What is the 2nd sequence in the file Sample1_R1.fastq?
| Expand | ||
|---|---|---|
| ||
Use the head command. |
| Expand | ||
|---|---|---|
| ||
Executing the command above reports that the 2nd sequence has ID = @SRR030257.2 HWI-EAS_4_PE-FC20GCB:6:1:407:767/1, and the sequence TAAGCCAGTCGCCATGGAATATCTGCTTTATTTAGC |
...
If this doesn't work, check what directory you are in currently (pwd) and that you've provided the right path to the file. Tab is your friend! |
Exercise: Get the first 10 read IDs in the fastq file
| Expand | ||
|---|---|---|
| ||
grep for lines starting with @HWI since our reads start with that. For GSAF illumina read ids, they always start with @HWI |
| Expand | ||
|---|---|---|
| ||
|
Counting sequences
One of the first thing to check is that your fastq files are the same length, and that length is evenly divisible by four. The wc command (word count) using the -l switch to tell it to count lines, not words, is perfect for this:
| Code Block | ||
|---|---|---|
| ||
wc -l $BI/ngs_course/intro_to_mapping/data/SRR030257Sample1_1R1.fastq |
Exercise: Counting FASTQ file lines
...
| Expand | ||
|---|---|---|
| ||
The wc -l command says there are 15200720 16000000 lines. FASTQ files have 4 lines per sequence, so the file has 1516,200000,720000/4 or 34,800000,180 sequences. |
What if your fastq file has been compressed, for example by gzip? You can still count the lines, and you don't have to uncompress the file to do it:
| Code Block | ||
|---|---|---|
| ||
gunzip -c $BI/web/yeast_stuff/Sample_Yeast_L005_R1.cat.fastq.gz | wc -l
|
Here you use gunzip -c to write decompressed data to standard output (-c means "to console", and leaves the original .gz file untouched). You then pipe that output to wc -l to get the line count.
...
000 sequences.
|
Lets move on to assessing the quality of this data...