Got it. Thank you very much.
Hi, I have the bam files from illumina company. I obtained the following output from running the samtools flagstat command for one bam file:
1403478261 in total
100745504 QC failure
63676619 duplicates
1403478261 mapped (100.00%)
1403478261 paired in sequencing
704406339 read1
699071922 read2
1331910684 properly paired (94.90%)
1343780774 with itself and mate mapped
59697487 singletons (4.25%)
7717886 with mate mapped to a different chr
7574861 with mate mapped to a different chr (mapQ>=5)
Could anyone give me an explanation about the QC failure and properly paired from Illumina's company's bam file?
3 answers
If you want to do some googling, the QC metric used by Illumina is called the "chastity filter". Chastity is a measure of the signal to noise ratio and is defined as the "the ratio of the highest of the four (base type) intensities to the sum of highest two."
The chastity threshold is 0.6 and this threshold is applied to the first ~20 positions in the read, regardless of the read length. (I forget exactly how many positions are currently used, as the chastity filtering algorithm has changed over time) At most one base is allowed to fail to meet the 0.6 ratio threshold...if more than one base is below threshold the read is marked as failing QC. (For paired end reads, if either end of a pair fails to meet the threshold both ends are marked as QC failed.)
The most common source of chastity failure is two (or more) adjacent clusters being so physically close together that their signals cannot be measured independently.
Any chance you have a reference for "the ratio of the highest of the four (base type) intensities to the sum of highest two." ? I can't find it on illumina's homepage.
QC Failure= too many Ns in your reads
properly paired = you have used a paired end sequencing. http://www.illumina.com/technology/paired_end_sequencing_assay.ilmn . Both left and right reads have been mapped on the same region of the genome at a distance compatible with the expected mean size of the fragments.
Hi Pierre, thanks for your useful answer. For QC failure, do there exist a threshold for the definition, such as 50 Ns in the reads? By the way, would you like to tell me how to obtain the read length, just use samtools view command to have a look?
Typically, QC failure = not pass the purity filter. They may not have too many Ns.
For QC failure, see Nina's answer.
"Properly paired" is from the flags set by whatever aligner you've used. For instance, if you use bwa's 'sampe' alingment, you can specify the maximum insert length with -a. For a pair to be "properly paired" it would need to have both reads mapped to the same sequence within this distance.
That -a option usually does not work as what you have expected...
Log in to answer this question.