Entering edit mode
5.1 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.
while keeping the alignement coordinates? Or just reverse complementing the sequence?
While keeping the alignment coordinates but just in reverse.
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.
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.