# Taxa co-occurence

**URL:** <https://forum.mothur.org/t/taxa-co-occurence/362>\
**Category:** Feature requests\
**Created:** [September 28, 2010, 1:41pm UTC](https://forum.mothur.org/t/taxa-co-occurence/362 "2010-09-28T13:41:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarrod\_s](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@jarrod\_s](https://forum.mothur.org/u/jarrod_s)\
**Post date:** [September 28, 2010, 1:41pm UTC](https://forum.mothur.org/t/taxa-co-occurence/362/1 "2010-09-28T13:41:59Z")

</div>

Hello all,

First, apologies if this is not the best index for this post.  
I am not sure if anyone has investigated taxa co-occurrence but I have been trying to perform this type of analysis at different OTU definitions for my dataset.

Briefly, I have 15 samples.

1. I start with an OTU _by_ sample matrix, eliminate singletons and change the matrix to _presence_ (1) and _absence_ (0) data only (no abundance). This is seen in the first panel of the attached figure. Samples along the horizontal, and OTU’s along the vertical. Again, I do this at multiple OTU definitions

2. I then wrote a perl script to create a matrix that calculates all pair-wise comparisons for each OTU’s (second panel). The number of pair-wise comparisons is roughly equal to the number of OTU’s (N) squared, divided by 2. N^2/2. As you can imagine, this number gets fairly large.

3. finally, using another perl script, I calculated the total cases of presence-presence (PP), presence-absence (PA), absence-presence (AP) and absence-absence (AA) for each pairwise comparison. Since I have 15 samples, the horizontal marginal totals will always equal 15. (see third panel in attached figure). Since many taxa are rare the AA is relatively high, especially at more stringent OTU definitions (100% e.g.)

So, what I am looking for is statistically meaningful taxa combinations where, for example, taxa co-occur more than expected by chance or never co-occur more than expected by chance. A similar analysis was performed by Chaffron et al 2010 [http://genome.cshlp.org/content/20/7/947](http://genome.cshlp.org/content/20/7/947). They used Fisher’s exact test to choose meaningful OTU pairs.

My problem is that I am not sure how to implement this test OR whether I have enough data to perform such an analysis. If anyone is interested in discussing this please let me know, or if anyone has any ideas on this analysis. It is very common in macro-ecology studies. Also, is this an analysis that mothur would be interested in implementing?

  
Thanks,

jarrod  
Upload not implemented: Untitled.png

---

<div class="post-metadata">

**Author:** ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)\
**Post date:** [September 28, 2010, 8:47pm UTC](https://forum.mothur.org/t/taxa-co-occurence/362/2 "2010-09-28T20:47:21Z")

</div>

Jarrod-  
This is definitely something we’re interested in and will be adding a few options in the coming months.  
Pat

---

<div class="post-metadata">

**Author:** ![jarrod\_s](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@jarrod\_s](https://forum.mothur.org/u/jarrod_s)\
**Post date:** [September 28, 2010, 10:09pm UTC](https://forum.mothur.org/t/taxa-co-occurence/362/3 "2010-09-28T22:09:25Z")

</div>

Hi Pat.

Awesome. let me know if you would like any input.

j

---

<div class="post-metadata">

**Author:** ![mbakker](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@mbakker](https://forum.mothur.org/u/mbakker)\
**Post date:** [September 29, 2010, 7:43pm UTC](https://forum.mothur.org/t/taxa-co-occurence/362/4 "2010-09-29T19:43:47Z")

</div>

This is something that I am very interested in as well… in fact, I just signed on to put in a request for this very feature!  
Thanks for the reference too!
