filtering bam file
Hello,
I want to filter a bam file based on the number of reads mapped to each position in the genome.
For example I want to keep only the positions that are covered by >=40 stacked reads (with different length) but starting at the same position
Thanks
• 2,799 views
•
link
1 answer
Hi,
you can use the bedTools' genomeCoverageBed bamToBed and mergeBed to get all start-positions' coverage; filter all positions with coverage >= 40, and build a bed file. This bed-file can be used as input for samtools view (-L bedfile) intersectBed with the first bed-file and extract the read-names.
Cheers,
Michael
• 0 views
•
link
Log in to answer this question.
I tried