Extract aligned reads from a bam file for only selected coordinates
0
0
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?

bam samtools alignment pacbio • 872 views
ADD COMMENT

Login before adding your answer.

Traffic: 1290 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6