title: How to subset phyloseq object to show overlapping ASVs from two sample types
body: <p>I have a phyloseq object made called &quot;shared&quot;</p>
  <pre><code>    phyloseq-class experiment-level object
  otu_table()   OTU Table:         [ 3823 taxa and 64 samples ]
  sample_data() Sample Data:       [ 64 samples by 17 sample variables ]
  tax_table()   Taxonomy Table:    [ 3823 taxa by 12 taxonomic ranks ]
  </code></pre>
  <p>and I am trying to make a new phyoloseq object from the interesction of the shared ASVs between the two sample types.</p>
  <p>basically, I want a phyloseq object of the green part of this Venn diagram.</p>
  <p><a href="https://i.stack.imgur.com/BQJT6.png" rel="nofollow noreferrer">Venn Diagram</a>.</p>
  <p>I made this plot from the &quot;MicEco&quot; package and have not found a way to access that interestion from it.</p>
  <pre><code>library(&quot;MicEco&quot;)
  venn&lt;-ps_venn(shared,&quot;sample_type&quot;, quantities = list(type=c(&quot;percent&quot;,&quot;counts&quot;), font = 2), labels = list(cex = 2), col = &quot;black&quot;, fill = c(&quot;red&quot;,&quot;yellow&quot;,&quot;green&quot;))
  venn
  </code></pre>