# finding unique OTUs from Venn comparison

**URL:** <https://forum.mothur.org/t/finding-unique-otus-from-venn-comparison/3348>\
**Category:** Commands in mothur\
**Created:** [July 31, 2017, 4:04pm UTC](https://forum.mothur.org/t/finding-unique-otus-from-venn-comparison/3348 "2017-07-31T16:04:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wolfgangrumpf](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/wolfgangrumpf/32/118_2.png) [@wolfgangrumpf](https://forum.mothur.org/u/wolfgangrumpf)\
**Post date:** [July 31, 2017, 4:04pm UTC](https://forum.mothur.org/t/finding-unique-otus-from-venn-comparison/3348/1 "2017-07-31T16:04:53Z")

</div>

I’m trying to determine which OTU’s are unique to specific conditions - sharedotus will tell me which OTUs they have in common, but if doing a Venn comparison of more than 2, determining the unique OTUs to a specific condition is a bit tricky. Any hints?

---

<div class="post-metadata">

**Author:** ![wolfgangrumpf](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/wolfgangrumpf/32/118_2.png) [@wolfgangrumpf](https://forum.mothur.org/u/wolfgangrumpf)\
**Post date:** [July 31, 2017, 4:36pm UTC](https://forum.mothur.org/t/finding-unique-otus-from-venn-comparison/3348/2 "2017-07-31T16:36:22Z")

</div>

An update - I read in the docs that you could use groups to specific the groups in get.otus, so I tried:

get.otus(groups=TB\_noIAI, shared=stability.tx.PTBIAI.shared, constaxonomy=stability.cons.taxonomy, accnos=stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.vsearch.accnos)

And mothur said:  
groups is not a valid parameter.

Seems like this might be what I want, as it would get me the otus for just one group (or multiples) - I’m confused, is groups not working?

---

<div class="post-metadata">

**Author:** ![westcott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/westcott/32/18_2.png) [@westcott](https://forum.mothur.org/u/westcott)\
**Post date:** [August 3, 2017, 5:37pm UTC](https://forum.mothur.org/t/finding-unique-otus-from-venn-comparison/3348/3 "2017-08-03T17:37:50Z")

</div>

The get.sharedseqs command, [https://mothur.org/wiki/Get.sharedseqs#uniquegroups\_.26\_sharedgroups](https://mothur.org/wiki/Get.sharedseqs#uniquegroups_.26_sharedgroups), is a better fit for what you are looking to do.

To find the OTUs that contain only sequences from a set of groups (unique to), run the following:

mothur \> get.sharedseqs(shared=yourSharedFile, uniquegroups=group1-group2, output=accnos) - list OTUs that are unique to group1/group2

To find all OTUs containing sequences from a set of groups (shared by), run the following:

mothur \> get.sharedseqs(shared=yourSharedFile, sharedgroups=group1-group2, output=accnos) - list OTUs that are contain sequences from group1/group2
