- Check data quality with fastqc
- Summarize QC results with MultiQC
- OPTIONAL: check for contamination with fastqc_screen
- OPTIONAL: filtering reads with fastq_screen
Check data quality with fastqc
fastqc is routinely used as a command-line program for assessing the quality of reads in raw fastq files. The program can be run on your laptop, but it will be much easier/faster to run on a server with more compute power.
Begin by using fastqc to check the quality of each of your fastq files.
# navigate to the folder with your raw fastq files # run fastqc on all files, putting the outputs into a new folder called 'fastqc' fastqc *.gz -t 24 -o fastqc
Summarize QC results with MultiQC
MultiQC is a fantastic piece of software for aggregating and summarizing the outputs from many different kinds of bioinformatics programs in one convenient and interactive html file. In this case, we’ll use it to summarize the output from fastqc.
# change to the directory with your fastqc outputs # run multiqc with the -d command to tell multiqc to look in all folders (data, analysis and qa) to find log files multiqc -d .
You should now see a multiqc_report.html file in your project directory. You can copy this file from our server to your local computer using an FTP client (e.g. FileZilla), then double click and explore!
OPTIONAL: check for contamination with fastqc_screen
Often times there are questions about whether there may be reads, other than those from the intended sample source, present in a data file. If you suspect contamination of a particular kind (e.g. other host, plasmid, rRNA, or some common bacterium used in lab), you can run fastq_screen to check a subsample of reads from your raw fastq file against a set of reference genomes.
You can read more about fastq_screen in this recent paper
fastq_screen uses bowtie2 for aligning reads to the references, so we’ve provided a set of reference genomes on our server to which you can easily compare.
We’ve taken care of configuring fastq_screen so that it knows where to find bowtie2 and where to look for the reference genomes. This information is pretty clearly outlined in the fastq_screen configuration file found at
# make sure you're in the directory where your fastq files are fastq_screen --threads 24 --outdir fastq_screen *gz
- Mouse (Mus musculus)
- Dog (Canis familiaris)
- Cow (Bos taurus)
- Horse (Equus caballus)
- Pig (Sus scrofa)
- Chicken (Gallus gallus)
- Fruitfly (Drosophila melanogaster)
- Yeast (Saccharomyces cerevisiae)
- E. coli (strain K12)
- Staph (Staphyloccous aureus strain NCTC 8325)
- Lambda phage (Enterobacteriophage lambda)
OPTIONAL: filtering reads with fastq_screen
Depending on the results you get with
fastq_screen above, you may want to filter reads based on alignment to a particular reference genome of interest. This is particularly useful for removing host reads contaminating a metagenomic sample, for example. To do this, you can use the
--filter options for fastq_screen. See the documentation for fastq_screen to understand how to properly use
First, tag each read in each fastq with the genome to which it aligns (from the available references described above)
fastq_screen --tag sampleX.fastq.gz
Next, filter based on tags that were assigned above
fastq_screen --filter 1000 sampleX.fastq.gz