Prototype code for converting Global Alliance (Side Graph) Server graph to VG.
(c) 2015 Glenn Hickey. See LICENSE for details.
See also:
- vg2sg: Convert VG to Side Graph SQL
- hal2sg: Convert HAL (output by Cactus and CAMEL) to Side Graph SQL
Download entire graph from server into memory. Cut sequences so that all joins are incident to the first or last side of a sequence. Print resulting graph in VG JSON format to stdout.
Dependency: libcurl needs to be installed.
Cloning: Don't forget to clone submodules:
git clone https://github.com/glennhickey/sg2vg.git --recursive
Note Start by verifying that the unit tests all pass:
make test
To run the converter:
sg2vg graph-url -u | vg view -J -v - > graph.vg
graph-url
URL of graph server with version attached at end
graph.vg
Output VG graph. VG must be installed for vg view
to work...
Options
-h, --help
-p, --pageSize Number of records per POST request (default=1000).
-u, --upper Write all sequences in upper case. (RECOMMENDED)
-a, --paths Add a VG path for each input sequence.
-n, --no-paths Don't write any paths.