This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to get unique mapped reads from a bam file of singe end sequencing ?

Hi , how to get unique mapped reads from a bam file of singe end sequencing ?

there is no XT mark in my bam .
sequence next-gen genome alignment

What do you mena by Unique as this word sometimes misleading since it has different meanings. May be you can filter out the reads whose MAPQ score greater then 30 which can give you uniquely mapped reads. Also while mapping use bowtie which has a parameter "m". Take a look at that parameter

HI , sorry ! i wanna keep reads that can be uniquely mapped and I use BWA mem for mapping . do you know a better software or tool to do that ? thank you very much!

Hi ,igor, I have read , but that do not provide any clear suggestion. I just wanna extract all reads that align once to the genome. samtools view -bq 30 > unique_mapped.bam ? it's right ?

Which aligner was used? The method is completely aligner-dependent. This is among the reasons that (A) there's not one single recommended method and (B) people normally don't do this. I would suggest that you don't want to do this and that instead you actually want to filter for "likely correct" alignments, which would be more like samtools view -bq 10 foo.bam > likely_correct.bam. This will exclude what you probably consider to be a "unique alignment" that is less likely to be correct (because the concept of unique alignment isn't useful).

Hello winter_li!

There are already a ton of threads on this on the forum. Can you please go through some of them and then leave a comment here if somehow none of them address your particular case?

Look to the right for example threads.

0 answers

No answers yet.

Log in to answer this question.