maickrau / GraphAligner

MIT License
255 stars 30 forks source link

Doesn't GraphAligner support `.vg` graph? #87

Open tanger-code opened 1 year ago

tanger-code commented 1 year ago

When I use .vg graph in GraphAligner's mapping command GraphAligner -g chr21.vg -f chr21.fq -t 88 -a graphaligner_aln.gam -x vg, there is something error: image Why did I get this error?Doesn't GraphAligner support .vg graph?

tanger-code commented 1 year ago

When I use the GFA graph, it works. But why can't it be vg graph?

maickrau commented 1 year ago

It's supposed to support vg graph. Could you please upload the graph?

tanger-code commented 1 year ago

https://s3-us-west-2.amazonaws.com/human-pangenomics/pangenomes/freeze/freeze1/minigraph-cactus/hprc-v1.1-mc-grch38/hprc-v1.1-mc-grch38.chroms/chr21.vg

maickrau commented 1 year ago

This seems to be caused by changes in the vg file format. Up until vg version 1.40.0 the default was the protobuf format which GraphAligner can read, and then it was changed to a PackedGraph format which GraphAligner does not read, while keeping the same file extension .vg for both different formats. You can check the file format with vg stats -F chr21.vg which reports that the graph is indeed in PackedGraph format instead of protobuf.

You can sidestep this issue either by using the GFA graph, or by using vg to convert the graph from PackedGraph to protobuf. I'll leave this issue open while I think about a solution.

yeeus commented 1 month ago

@maickrau hi, have you solved this problem? I also met this issue