Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple graphs from one file #20

Open
edonbajrami opened this issue Feb 24, 2015 · 0 comments
Open

Multiple graphs from one file #20

edonbajrami opened this issue Feb 24, 2015 · 0 comments

Comments

@edonbajrami
Copy link

I have 8 or more graphs in one file, when I try to read the file shows me that:

"SyntaxError: Expected comment, end of input or whitespace but "#" found.

My dot file example:

graph "21" {
graph [bgcolor="transparent"]
Node_0 [label="N"];
Node_1 [label="N"];
Node_2 [label="C"];
Node_3 [label="C"];
Node_4 [label="C"];
Node_4 -- Node_0 [label="1"];
Node_2 -- Node_1 [label="1"];
Node_3 -- Node_2 [label="1"];
Node_4 -- Node_3 [label="1"];
}# => 2[1 HMDB00001 ,2 HMDB00002]
graph "22" {
graph [bgcolor="transparent"]
Node_0 [label="N"];
Node_1 [label="C"];
Node_2 [label="C"];
Node_3 [label="C"];
Node_1 -- Node_0 [label="1"];
Node_2 -- Node_1 [label="1"];
Node_3 -- Node_2 [label="1"];
}# => 2[1 HMDB00001 ,2 HMDB00002]
graph "23" {
graph [bgcolor="transparent"]
Node_0 [label="C"];
Node_1 [label="C"];
Node_2 [label="C"];
Node_1 -- Node_0 [label="1"];
Node_2 -- Node_1 [label="1"];
}

I have tried with this code:

var fs = require('fs')
var dot = require('graphlib-dot')

var graph = dot.read(fs.readFileSync('p_out.dot', 'UTF-8'));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant