title: Plot iGraph (R) from dot file
body: <p>I've been trying to get <code>a .dot</code> file into <code>iGraph</code>, but I run into some issues and only get it semi-working. </p>
  
  <p>Here's the .dotfile:</p>
  
  <pre><code>digraph "" {
  0 [color="[ 1.      0.7812  0.4975  1.    ]", copynr=1, gene=None,     label=3473, type=tf, typeLabel="tf D*-e"];
  1 [color="(0.0, 0.90196078431372551, 0.5490196078431373, 1.0)", copynr=1, exporting=False, gene=None, label=3472, type=pump, typeLabel="i-pC"];
  2 [color="(1.0, 0.62527233115468439, 0.0, 1.0)", copynr=1, gene=None, label=3473, type=enz, typeLabel="A &gt;\nC"];
  3 [color="[ 1.          0.65253176  0.41555882  1.        ]", copynr=1, gene=None, label=3474, type=tf, typeLabel="tf C-i"];
  4 [color="(0.0, 0.0, 0.94563279857397498, 1.0)", copynr=1, gene=None, label=3474, type=enz, typeLabel="B &gt;\nA+D*"];
  5 [color="(0.0, 0.0, 1.0, 1.0)", copynr=1, exporting=False, gene=None, label=3473, type=pump, typeLabel="i-pA"];
  6 [color="(0.0, 0.45098039215686275, 0.77450980392156865, 1.0)", copynr=1, exporting=False, gene=None, label=3474, type=pump, typeLabel="i-pB"];
  7 [color="[ 0.82352922  0.5208      0.33166667  1.        ]", copynr=1, gene=None, label=3472, type=tf, typeLabel="tf B-i"];
  8 [color="(0.22454142947501579, 1.0, 0.74320050600885512, 1.0)", copynr=1, gene=None, label=3472, type=enz, typeLabel="C &gt;\nB+D*"];
  9 [color="(0.0, 0.53529411764705859, 1.0, 1.0)", copynr=1, gene=None, label=3531, type=enz, typeLabel="C &gt;\nA+D*"];
  self [marker=1157];
  0 -&gt; 2  [effect="0.171502525962", effect_apo="0.0673415230763", strength="0.622317743898"];
  0 -&gt; 4  [effect="0.171502525962", effect_apo="0.0673415230763", strength="0.622317743898"];
  3 -&gt; 9  [effect="0.294786035872", effect_apo="0.284853949868", strength="0.962982478672"];
  3 -&gt; 6  [effect="0.294786035872", effect_apo="0.284853949868", strength="0.962982478672"];
  3 -&gt; 7  [effect="0.294786035872", effect_apo="0.284853949868", strength="0.962982478672"];
  7 -&gt; 1  [effect="0.0602136016303", effect_apo="0.0998341322605", strength="1.39594437271"];
  7 -&gt; 9  [effect="0.0602136016303", effect_apo="0.0998341322605", strength="1.39594437271"];
  7 -&gt; 7  [effect="0.0602136016303", effect_apo="0.0998341322605", strength="1.39594437271"];
  }
  </code></pre>
  
  <p>Here's what I have so far in R:</p>
  
  <pre><code>library(sna)
  library(igraph)
  
  g.dot &lt;- read.dot("GRN_0000000002_apo_dot.dot")
  g.graph &lt;- graph.adjacency(g.dot)
  plot(g.graph)
  </code></pre>
  
  <p>As you can see in the picture, it somehow uses the edge attributes as node-names, and therefor fails to actually have 1 copy of vertex 9 and 7. Also, all the attributes from the edges (color, label) are nowhere to be found.</p>
  
  <p><strong>Resulting iGraph plot</strong></p>
  
  <p><a href="https://i.stack.imgur.com/mx22P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mx22P.png" alt="enter image description here"></a></p>
  
  <p>Any idea how to actually do this? I'm afraid I only have .dot files, so this is what I have to use. </p>