title: Subgraph extraction based on starting and terminal node
body: <p>I must ask this question as I am not sure if it is difficult or easy. I'd like to extract a subgraph in igraph but with the following bindings: starting from <code>Viridiplantae-3</code> to <code>Proteobacteria-2</code> (see image)</p>
  
  <p>I can find the path from shortest.path() but I am not sure how to extract a subgraph based on list of nodes. Because shortest.path will not include <code>Proteobacteria-1</code> and <code>Proteobacteria-2</code>. I don't want to include <code>100.2</code>:<code>Viridiplantae-1</code>,<code>Viridiplantae-2</code> and <code>68.1</code>:<code>Stramenopiles-1</code>,<code>Rhodophyta-1</code>.</p>
  
  <p>In short, given <code>Viridiplantae-3</code> and <code>Proteobacteria-2</code>, I want to extract everything that is in the red.</p>
  
  <p><img src="https://i.stack.imgur.com/ai5I5.png" alt="Plotted undirected graph of tree; there is no &quot;root&quot;"></p>
  
  <p>Reproducible instructions:</p>
  
  <pre><code>library(ape)
  
  library(igraph)
  
  cat("(((Viridiplantae_1:1.22123006e-06,Viridiplantae_2:1.22123006e-06)100.2:0.9709833387,Viridiplantae_3:1.217705775)100.1:1.394125713,((Proteobacteria_1:0.2479324862,Proteobacteria_2:0.4385740351)100.3:0.696357212,(Rhodophyta_1:1.675875775,Stramenopiles_1:1.869948709)68.1:0.48853466)52.1:0.2231628399,Proteobacteria_3:0.8491431473);", file = "testTree.tre", sep = "\n")
  
  cur_Tree &lt;- read.tree("testTree.tre")
  
  cur_Tree$node.label[1] &lt;- "root" 
  
  cur_Grph &lt;- as.igraph(cur_Tree)
  </code></pre>
  
  <p>cur_Grph is the graph in the image</p>