Entering edit mode
7.0 years ago
KVC_bioinfo
▴
600
Hello all,
I am trying to extract the reads falling into the particular region from a bam file. I am using the following command:
samtools view -b out.bam "chr10:regionstart-regionend" > region.bam
When I run this command I only get one read into the output. However, I can see many reads mapping in that particular region when I visualize the alignment in IGV.
Could someone help me identify what am I doing wrong?
Thank you in advance
what is the version of samtools, did you try to re-index the bam ?
Program: samtools (Tools for alignments in the SAM format) Version: 0.1.19-44428cd
No I did not re-index it.
try to re-index; Use a newer version of samtools (I'm not sure 0.1.19 is able to handle supplementary alignments)
As pciifen said, region format is chr:start-stop, like "chr3:1000-2000"