GuoliangLi-HZAU / BatMeth2

BS-seq analysis pipeline
38 stars 13 forks source link

Unique alignment #31

Open HarryZhang1224 opened 2 years ago

HarryZhang1224 commented 2 years ago

Hi,

I was wondering how does BatMeth2 determine if an alignment is unique for paired-end alignment? I couldn't find this in the paper or the manual. Is there some way I can filter uniquely aligned paired-end reads from the .bam file?

Harry

ZhouQiangwei commented 2 years ago

Hi,

If you want unique mapping reads for downstream analysis, you can use samtools to filter with map quality greater than 30. The specific command is 'samtools view -q 30 align.sam > out.filterq30.sam’. If you only want to get the paired-end result, the command should be 'samtools view -f 2 -q 30 align.sam'. Hope this useful for your question.

momo