This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bowtie2 alignment: Reads that aligned concordantly >1 times

Hello Guys!

I would like to extract reads that "concordantly >1 times" from SAM output file and make a new file with only this reads [reads that aligned concordantly > 1 times]. I did a alignment on Bowtie2 software.

Thanks very much.

35133445 reads; of these:
  35133445 (100.00%) were paired; of these:
    33688527 (95.89%) aligned concordantly 0 times
    1373944 (3.91%) aligned concordantly exactly 1 time
    70974 (0.20%) aligned concordantly >1 times [make a new file with this reads.]
bowtie map bowtie2 score alignment

1 answer

Something like samtools view -h foo.bam | grep -v "NH:i:1" | samtools view -Sbo foo.multimappers.bam - will probably work. You could also just pipe to a SAM file rather than samtools if you want.

Log in to answer this question.