...
See the Wikipedia FASTQ format page for more information.
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
cp -r /corral-repl/utexas/BioITeam/rnaseq_course/fastqc_exercise .
cd fastqc_exercise |
Exercise: Examine the 2nd sequence in a FASTQ file
What is the 2nd sequence in the file /corral-repl/utexas/BioITeam/ngs_course/intro_to_mapping/data/ SRR030257_1.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 @SRR 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/SRR030257_1.fastq
|
Exercise: Counting FASTQ file lines
...
| Expand | ||
|---|---|---|
| ||
The wc -l command says there are 15200720 lines. FASTQ files have 4 lines per sequence, so the file has 15,200,720/4 or 3,800,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.
...
|