I have a set of bam files that include reads with quality scores in a mix of incompatible formats. This includes Solexa, Illumina 1.5, and Sanger encoding. The reads were aligned with
bwa, so as far as I understand the misspecified quality scores didn't affect the alignment and were just copied through to the final bam file.
Now I'd like to call variants with these datasets using
samtools mpileup, but I am stuck because the quality scores in all input files need to have the same encoding. That is, I am aware of the
-6 flag to
mpileup that would work if all the samples were in Illumina 1.5 format, but it's not applicable since I have a mix.
So my question is: can I do anything better than the brute force approaches of (1) fixing the original fastq files and realigning or (2) mucking through the bam files and changing quality scores myself with e.g.