How get subgraph from very big graph ?

I have very big directed graph (without loops etc.)

I want isolate subgraph by node name into new graph.
All other part of source graph not required.

How i can do it ?

I found only one tool : prune, but it do something another.

Use the gvpr tool. I don't

Use the gvpr tool. I don't know what your predicate is, but as an example, suppose you want the subgraph of all nodes whose name begins with 'A', and your graph is stored in graph.gv. You can then run the command

gvpr 'N[$.name=="A*"]' graph.gv > subgraph.gv

If you want the induced edges, just as the flag -i :

gvpr -i  'N[$.name=="A*"]' graph.gv > subgraph.gv

I don't know what scripting language you use, so you also may have to quote special characters differently. Alternatively, or if the gvpr script gets too long, put it into a file, say, subgraph.gvpr and then run

gvpr -i -f subgraph.gvpr graph.gv > subgraph.gv

Recent comments