How to include original base quality (OQ) from FASTQ file into existing bam file
1
0
Entering edit mode
2.1 years ago
gnanakkan • 0

Hello,

I need to append the base quality of fastq file into my existing bam file which does not contain OQ.

One option I see making bam to sam and flattening the fastq 4 lines as one-liner to get the matching quality for the aligned reads, is there any parameters in samtools or any other tools readily available to do this?

The bam is generated by Parabricks germline pipeline. Ultimately I need to convert the bam to cram with OQ.

Thanks in advance.

alignment • 734 views
ADD COMMENT
1
Entering edit mode

Has the BAM file been produced from this fastq file? If so the base quality should be in there, in column 11 of the SAM file. Can you show an example of that file like samtools view your.bam | head?

ADD REPLY
0
Entering edit mode
2.1 years ago
gnanakkan • 0

It's bqsr bam, the original quality in the bam overwritten by bqsr. I'm planning to rerun the piepline in two steps. first, generate the bam and duplicate the quality column one with OQ flag then apply bqsr, in that way I could preserve the OQ also get the bqsr quality. Thanks

ADD COMMENT

Login before adding your answer.

Traffic: 1244 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