Entering edit mode
4.0 years ago
star715
▴
50
Hi, I want to extract only the reads aligned to a given positions of a reference genome from an aligned bam file. E.g. chr1:1000-2000
samtools view chr1:1000-2000
gives me all the reads that align to the region and beyond. However I want to clip off the alignments at 1000 to 2000 positions of the genome. I do not want to grab the regions in aligned reads before 1000 and after 2000 positions of the genome. How can I do this?
see Limiting variant calls to amplicon target regions?
tool for bam soft clipping reads within bed file regions