When run in -k or -a modes to report secondary alignments of reads, bowtie2 only populates the QUAL field of the first reported alignment of a read. The QUAL fields of all other alignemnts are left as '*'. This makes it tedious to parse the resulting SAM files since state needs to be maintained to know the QUALs, especially since the expected QUAL of a secondary alignment will the the reverse of the first alignment's if they map to opposite strands. Would it be possible to make bowtie 2 fill in all QUAL fields?
- Jeff
This turned out to be very simple to do. In aln_sink.cpp, changing line 1806 to be the same as line 1790 produces my requested behvaior.
Given the function call in question (omitSecondarySeqQual()), it seems like this may have been the intended behavior all along.