How to specify the illumina phred scoring scheme in RSamtools pileup function?
1
1
Entering edit mode
@pandurang-kolekar-9911
Last seen 8.7 years ago

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,

 

 

rsamtools phred-scaled genotype quality • 1.3k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States

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.

ADD COMMENT
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 697 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6