I need to extract reads from an alignment I have done of the whole human genome. I am looking for the gene MACC1 which is located at Chr 7 20134655..20217384, I used this command:
samtools view -b -h <AlnSrt.bam> "Chr7:20134655-20217384" > <subSet.bam>
but I got:
[main_samview] region "Chr7:20134655-20217384" specifies an unknown reference name. Continue anyway.
Using IGV I can see that the reference has a name chr7 so I changed to:
samtools view -b -h <AlnSrt.bam> "chr7:20134655-20217384" > <subSet.bam>
But in that case, nothing happens at all. The
unknown reference name comes out even if I use
How can I check the name of the reference?
How can I extract these reads?