title: revealing clusters of interaction in igraph
body: <p>I have an interaction network and I used the following code to make an adjacency matrix and subsequently calculate the dissimilarity between the nodes of the network and then cluster them to form modules:</p>
  
  <pre><code>ADJ1=abs(adjacent-mat)^6
  dissADJ1&lt;-1-ADJ1
  hierADJ&lt;-hclust(as.dist(dissADJ1), method = "average")
  </code></pre>
  
  <p>Now I would like those modules to appear when I plot the igraph.</p>
  
  <pre><code>g&lt;-simplify(graph_from_adjacency_matrix(adjacent-mat, weighted=T))
  plot.igraph(g)
  </code></pre>
  
  <p>However the only thing that I have found thus far to translate hclust output to graph is as per the following tutorial: <a href="http://gastonsanchez.com/resources/2014/07/05/Pretty-tree-graph/" rel="nofollow noreferrer">http://gastonsanchez.com/resources/2014/07/05/Pretty-tree-graph/</a></p>
  
  <pre><code>phylo_tree = as.phylo(hierADJ)
  graph_edges = phylo_tree$edge
  graph_net = graph.edgelist(graph_edges)
  plot(graph_net)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/HoNTJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HoNTJ.png" alt="enter image description here"></a></p>
  
  <p>which is useful for hierarchical lineage but rather I just want the nodes that closely interact to cluster as follows:</p>
  
  <p><a href="https://i.stack.imgur.com/WnKt6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WnKt6.png" alt="enter image description here"></a></p>
  
  <p>Can anyone recommend how to use a command such as components from igraph to get these clusters to show?</p>