Question: Reverse Complement Reads in BAM File
0
gravatar for Viz
9 months ago by
Viz40
Viz40 wrote:

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 • 344 views
ADD COMMENTlink written 9 months ago by Viz40

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

ADD REPLYlink written 9 months ago by Carambakaracho2.2k

While keeping the alignment coordinates but just in reverse.

ADD REPLYlink written 9 months ago by Viz40

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 REPLYlink modified 9 months ago • written 9 months ago by genomax85k

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 REPLYlink written 9 months ago by michael.ante3.6k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1949 users visited in the last hour