Reverse Complement Reads in BAM File
0
0
Entering edit mode
4.5 years ago
Viz ▴ 50

Hello, I'm looking for a solution to reverse complement reads inside of a BAM file. I know that the obvious solution is to reverse complement reads before alignment, however that is not applicable in this case, the Fastx toolkit does not work here and seqkit provided results that weren't accurate for us. Is there any simple awk way to do this or any known software with this capability? Thank you.

alignment • 1.9k views
ADD COMMENT
0
Entering edit mode

while keeping the alignement coordinates? Or just reverse complementing the sequence?

ADD REPLY
0
Entering edit mode

While keeping the alignment coordinates but just in reverse.

ADD REPLY
0
Entering edit mode

What do you mean by reverse complement reads inside of a BAM file?

You could get the read headers of interest and then reverse complement the reads after extracting them from original file.

ADD REPLY
0
Entering edit mode

Have you tried reformat.sh from the bbmap suite?

It should be something like reformat.sh in=foo.bam out=foo_rc.bam rcomp=t.

It works on fastq and fasta files, it should work on BAM as well.

ADD REPLY

Login before adding your answer.

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