-
Hello, where can I find an example on how to create a tabix index from scratch? My use case is that I want to generate a A second use case would of course be read |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The strategy for building an index is to track the start and end virtual positions of each record. Each of these pairs is called a chunk. For tabix, the reference sequence name, record start position, record end position, and chunk are then used by the indexer. For your first use case, see
Please also update to noodles 0.54.0 / noodles-csi 0.26.0. While adding the |
Beta Was this translation helpful? Give feedback.
The strategy for building an index is to track the start and end virtual positions of each record. Each of these pairs is called a chunk. For tabix, the reference sequence name, record start position, record end position, and chunk are then used by the indexer.
For your first use case, see
tabix_write
. This shows writing and indexing a BED-like record structure, but it can be applied to VCF as well.vcf_index
shows an example of reading a bgzip-compressed VCF and writing a tabix index for it.Please also update to noodles 0.54.0 / noodles-csi 0.26.0. While adding the
tabix_write
example, I discovered a bug (fixed in 599aefa) in the builder, so thank you for asking about indexing!