pangenome / odgi

Optimized Dynamic Genome/Graph Implementation: understanding pangenome graphs
https://doi.org/10.1093/bioinformatics/btac308
MIT License
196 stars 40 forks source link

is there a way to extract from a graph with uncompacted node IDs? #497

Open esrice opened 1 year ago

esrice commented 1 year ago

I'm trying to extract a subgraph like so:

odgi extract -d100 -r'genome1#chr1:11159196-11400464' -o out.og -i pangenome.og

but receive the error

[odgi::extract] error: the node IDs are not compacted. Please run 'odgi sort' using -O, --optimize to optimize the graph

However, when I use the optimized graph, it of course has different node IDs than the original input gfa. This is a problem as I have a vcf containing node IDs from the unoptimized graph, and I want to be able to cross-reference between the subgraph and the vcf. Is there any way to do this? Thanks!