This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to extract unique mapped results from BWA results?

How to extract unique mapped results from BWA results?

I am working with 454 data, and I chose BWA mem as the mapping tool.

Thanks in advance.

alignment

1 answer

Hi man,

did you try samtools + grep funciton in terminal?

samtools view your_bwa.bam | grep "XT:A:U" > my_unique.sam

Best,

Paul.

This produces empty file in my case, whereas if I try this on the equivalent sam file:

grep -E "@|NM:" my.sam | grep -v "XS:" > my.sam.unique

seems to work. However my sam is produced by bowtie2 (if that's the cause of the confusion)

Log in to answer this question.