Question: How to specify the illumina phred scoring scheme in RSamtools pileup function?
1
3.6 years ago by
Pandurang Kolekar10 wrote:

Hi,

I am using pileup function in Rsamtools version 1.22.0. The bam file that I used as an input to the function has Illumina1.3+ based (phred64) scoring scheme. So I wish to know if there is any way to specify the phred scoring scheme to pileup function via pileupParam or scanBamParam. Does it decode the phred scoring automatically?

Thanks,

modified 3.6 years ago • written 3.6 years ago by Pandurang Kolekar10
Answer: How to specify the illumina phred scoring scheme in RSamtools pileup function?
0
3.6 years ago by
Martin Morgan ♦♦ 23k
United States
Martin Morgan ♦♦ 23k wrote:

Quality scores in the BAM file are stored as the ASCII code of the letter. You're supposed to provide an integer value such that 33 + min_base_quality is the relevant ASCII character, whatever your encoding scheme. From Wikipedia the lowest quality Illumina1.3+ ASCII letter is '@', which has ASCII coding 64, which in turn is 31 more than the reference 33. If you wanted nucleotides with score 9 or more (ASCII character 'I' coding 73, 40 more than the reference 33) you'd specify min_base_qual=40. At least I think that's how it works...

I created a function to map from integer or ASCII PHRED score to offset; it will be included in the next release (1.24.0) of Rsamtools.

Thank you Martin for your suggestion! I will try out this. Does anybody else have experienced this problem before?

Content
Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.