Difference between revisions of "BaseQualityCheck"

From Genome Analysis Wiki
Jump to: navigation, search
Line 8: Line 8:
 
'''Algorithm''':  
 
'''Algorithm''':  
  
It read SAM/BAM file line by line; then according to CIGAR string, it compares the alignment to reference genome base by base, then group match and mismatch frequencies by observed base quality.  
+
It read SAM/BAM file line by line. Then according to CIGAR string, it compares the alignment to reference genome (base by base) and record match and mismatch frequencies grouped by observed base quality.  
The output will be observed quality (generated by Illumina machine) and empirical quality (generated by Prob(Mismatch bases | base quality Q) = (Total number of mismatched bases| base quality Q) / (Total number of bases| base quality Q)).
+
The output will be observed quality (generated by Illumina machine) and empirical quality (calculated by Prob(Mismatch bases | base quality Q) = (Total number of mismatched bases with base quality Q) / (Total number of bases with base quality Q)), both in Phred quality score.
We omit soft clips, insertion and deletion.
+
 
 +
By default, we omit soft clips, insertion and deletion.
 +
 
 +
Note, we strongly recommend excluding dbSNP sites, or else you are likely to underestimate empirical quality. The program can read a plain text file to specify dbSNP positions via '-s' option.
  
 
'''Syntax''':
 
'''Syntax''':
Line 18: Line 21:
 
  -q -> alignment with less than minimum mapping quality will not be counted
 
  -q -> alignment with less than minimum mapping quality will not be counted
 
  -r -> reference genome (in KARMA format)
 
  -r -> reference genome (in KARMA format)
  -s -> load SNP positions from the file.  It may either be a text file with chr/index pairs, one per line, or you may use a file created from mkgenomevector (binary memory mapped file). For NCBI 37, a sample dbSNP file is located in /home/bingshan/data/db/dbSNP130.UCSC.coordinates.tbl
+
  -s -> load SNP positions from the file.  It may either be a text file with chr/index pairs, using 1-index position, one per line, or you may use a file created from mkgenomevector (binary memory mapped file). For NCBI 37, a sample dbSNP file is located in /home/bingshan/data/db/dbSNP130.UCSC.coordinates.tbl
 
  -v -> output SAM record in which mismatched bases exist
 
  -v -> output SAM record in which mismatched bases exist
 
   
 
   
 
Thank '''Bingshan''' for his qPlot program and his input to finish this program.
 
Thank '''Bingshan''' for his qPlot program and his input to finish this program.

Revision as of 22:50, 11 May 2010

Base Quality Check

(May 11, 2010 - Paul, Xiaowei)


Location: $(repository)/baseQualityCheck/baseQualityCheck

Algorithm:

It read SAM/BAM file line by line. Then according to CIGAR string, it compares the alignment to reference genome (base by base) and record match and mismatch frequencies grouped by observed base quality. The output will be observed quality (generated by Illumina machine) and empirical quality (calculated by Prob(Mismatch bases | base quality Q) = (Total number of mismatched bases with base quality Q) / (Total number of bases with base quality Q)), both in Phred quality score.

By default, we omit soft clips, insertion and deletion.

Note, we strongly recommend excluding dbSNP sites, or else you are likely to underestimate empirical quality. The program can read a plain text file to specify dbSNP positions via '-s' option.

Syntax:

baseQualityCheck [-c max record count] [-q minimumMapQuality] [-r reference] [-s dbSNP file] [-v]
-c -> only process first (max record count).
-q -> alignment with less than minimum mapping quality will not be counted
-r -> reference genome (in KARMA format)
-s -> load SNP positions from the file.  It may either be a text file with chr/index pairs, using 1-index position, one per line, or you may use a file created from mkgenomevector (binary memory mapped file). For NCBI 37, a sample dbSNP file is located in /home/bingshan/data/db/dbSNP130.UCSC.coordinates.tbl
-v -> output SAM record in which mismatched bases exist

Thank Bingshan for his qPlot program and his input to finish this program.