Closed tshauck closed 1 year ago
Ah, yes, the string maps aren't being passed to the new reader when constructing Query
. In c0b504dc8dbcb1eed645d95a66342f17abc6d0c5, I moved the reader state into the iterator to work around this. Thanks both for reporting and investigating!
Hi,
Thanks for building this package, it's been very nice to use.
I wanted to report that I've started getting:
when attempting to iterate through the query results for a BCF file. Here's a minimal example that uses the vcf from here.
I think the root cause is a change between 0.41 and 0.42, namely this change: https://github.com/zaeleus/noodles/commit/b56d31c23cff7a3aa078846430ff99a0a2fa2760. The logic change, I think, is that calling
Reader::from
results in thestring_maps
that were on the original reader after the call toread_header
to be returned to the default string maps. This then means that the chrom that should've existed in the string_maps no longer does and theget
fails.E.g. here you see
string_maps
with data...But then once we're inside
read_record
,string_maps.contigs()
is empty...Please let me know if I can clarify/fix anything or if it's just user error :)