GraphAligner icon indicating copy to clipboard operation
GraphAligner copied to clipboard

Doesn't GraphAligner support `.vg` graph?

Open tanger-code opened this issue 1 year ago • 5 comments

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 avatar Aug 14 '23 17:08 tanger-code

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

tanger-code avatar Aug 15 '23 05:08 tanger-code

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

maickrau avatar Aug 16 '23 09:08 maickrau

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

tanger-code avatar Aug 16 '23 09:08 tanger-code

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.

maickrau avatar Aug 16 '23 10:08 maickrau

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

yeeus avatar Jul 27 '24 07:07 yeeus