Skip to content

Using noodles_tabix for reading tbi-indexed tsv.bgz files #170

Answered by zaeleus
holtgrewe asked this question in Q&A
Discussion options

You must be logged in to vote

The general strategy to querying is to

  1. find the relevant chunks in the index (csi::Index::query),
  2. read the data between those chunks (csi::io::Query),
  3. parse the records within that data, and
  4. filter the records that intersect the region.

There is currently no way to query an arbitrary tabix-indexed file, but it is planned as part of #158. You can, however, implement 3 and 4. I added an example of this in noodles-tabix/examples/tabix_query_generic.rs.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by holtgrewe
Comment options

You must be logged in to vote
2 replies
@brentp
Comment options

@zaeleus
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
3 participants