samtools / htslib

C library for high-throughput sequencing data formats
Other
799 stars 445 forks source link

Warn if ref file is given but it doesn't contain the refs we need. #1517

Closed jkbonfield closed 1 year ago

jkbonfield commented 1 year ago

Eg "samtools view -T human.fa human.cram" but we have a "1" vs "chr1" mix up.

It's not a hard error, as we may have a partial reference we wish to use and there are further fallback measures to continue. Similarly we cannot check this at header loading time, as possibly we have a reference file for a single chromosome, a CRAM aligned against that single chromosome, but all SQ lines present in the header.

Improves the diagnostics for #1515