vgteam / vg

tools for working with genome variation graphs
https://biostars.org/tag/vg/
Other
1.08k stars 191 forks source link

Now I want to get some information from pack file. #4211

Open pioneer-pi opened 5 months ago

pioneer-pi commented 5 months ago

Now I usevg pack to get a packfile, They are read coverage in each base of variation graph. I want to get all the reads mapping to a special base position.For examples, I know base which node_id=3 and node_offset=0 has a value of read coverage, which is 53. Can I get all the 53 reads?

seq.pos   node.id    node.offset     coverage
4                  3                 0                  53
jeizenga commented 5 months ago

vg pack doesn't retain that information in the .pack file. If you want to query specific reads by node ID, you can use vg gamsort to create a .gai index for the sorted GAM file. Using the .gai index, you can use vg chunk to query the reads.