File: build_graph.cpp

package info (click to toggle)
vg 1.30.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 267,848 kB
  • sloc: cpp: 446,974; ansic: 116,148; python: 22,805; cs: 17,888; javascript: 11,031; sh: 5,866; makefile: 4,039; java: 1,415; perl: 1,303; xml: 442; lisp: 242
file content (33 lines) | stat: -rw-r--r-- 750 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <iostream>
#include <fstream>
#include "vg/io/json2pb.h"
#include <vg/vg.pb.h>
#include "vg.hpp"

using namespace std;
using namespace google::protobuf;
using namespace vg;

int main(int argc,char *argv[])
{
    VG graph;

    Node* n1 = graph.create_node("AAAACACGAAGGTGCTCACTGAAACATGGGAACCAAAG");
    Node* n2 = graph.create_node("TTTCCCACAACATAAGGAGCAGAGTGAAACTGCAGAGG");
    Node* n3 = graph.create_node("TTTCCCAGAGG");
    Node* n4 = graph.create_node("TACAATCATGGAATTCCAGAAAATG");

    graph.create_edge(n1, n2);
    graph.create_edge(n1, n3);
    graph.create_edge(n3, n4);
    graph.create_edge(n2, n4);

    /*
    ofstream of("test.vg");
    n.SerializeToOstream(&of);
    */

	cout<< pb2json(graph.graph) <<endl;

    return 0;
}