3.6 years ago by
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.