This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Fail to determine the sequence name

I am new to BAM file and samtools. I want to extract part of bam file by

samtools view _SRA_RUN_AUTO_ARCHIVE_TEST_vault_EGAR00001003032_5499_1.bam "Chr5:18000-45500" > output.bam

But I got

[bam_parse_region] fail to determine the sequence name.
[main_samview] region "Chr5:18000-45500" specifies an unknown reference name. Continue anyway.

What happened?

bam samtools

1 answer

chech there is a really a Chr5 (case sensitive) in the bam by printing the header:

samtools view -H _SRA_RUN_AUTO_ARCHIVE_TEST_vault_EGAR00001003032_5499_1.bam

Log in to answer this question.