You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using noodles-csi, the column indices when reading and writing a tabix header are off by one. The error comes from the tabix header using 1-based column indices, whereas noodles normalizes them to be 0-based.
This only affects the CSI reader and writer, not tabix.
The text was updated successfully, but these errors were encountered:
@brentp, this issue is fixed in noodles 0.58.0 / noodles-csi 0.27.0.
The only other issue in the given example is that you must track the reference sequence names, in the case of VCF. E.g., since there's only one record and reference sequence name:
- let mut indexer =- csi::index::Indexer::default().set_header(csi::index::header::Builder::vcf().build());+ let reference_sequence_names = [chrom].into_iter().collect();+ let header = csi::index::header::Builder::vcf()+ .set_reference_sequence_names(reference_sequence_names)+ .build();+ let mut indexer = csi::index::Indexer::default().set_header(header);
Alternatively, use tabix::index::Indexer. This works on reference sequence names instead of IDs and adds them to the index header on build.
Originally posted by @brentp in #214 (comment)
When using noodles-csi, the column indices when reading and writing a tabix header are off by one. The error comes from the tabix header using 1-based column indices, whereas noodles normalizes them to be 0-based.
This only affects the CSI reader and writer, not tabix.
The text was updated successfully, but these errors were encountered: