### We will be offering mothur and R workshops throughout 2019. Learn more.

# Difference between revisions of "Sharedchao"

Line 44: | Line 44: | ||

*.sharedChao | *.sharedChao | ||

− | The first line contains the labels of all the columns. First | + | The first line contains the labels of all the columns. First sampled which shows the frequency of the <math>S_{A,B Chao}</math> calculations. The frequency was set to 500, so after each 500 selected the <math>S_{A,B Chao}</math> is calculated at each of the distances, with a calculation done after all are sampled. The following labels in the first line are the distances at which the calculations were made and the names of the groups compared. Each additional line starts with the number of sequences sampled followed by the <math>S_{A,B Chao}</math> calculation at the column's distance. For instance, at distance 0.01, after 4392 samples <math>S_{A,B Chao}</math> was 152.768. |

## Revision as of 17:52, 14 January 2009

Validate output by making calculations by hand

**Example Calculations**

***.sharedChao**

Example calculations below will be performed using data from the Eckburg 70.stool_compare files with an OTU definition of 0.03.

Estimating the richness of shared OTUs between two communities. A Non-parametric richness estimator of the number of shared OTUs between two communities has been developed that is analogous to the Chao1 (6) single community richness estimator. The <math>S_{A,B Chao}</math> (11) estimator is calculated as:

<math>S_{A,B Chao} = S_{12 \left ( Obs \right )} + f_{11} \frac {f_{1+}f_{+1}}{4f_{2+}f_{+2}} + \frac{f_{1+}^{2}}{2f_{2+}} + \frac{f_{+1}^{2}}{2f_{+2}}</math>,

where,

<math>f_{11}</math> = number of shared OTUs with one observed individual in A and B

<math>f_{1+}, f_{2+}</math> = number of shared OTUs with one or two individuals observed in A

<math>f_{+1}, f_{+2}</math> = number of shared OTUs with one or two individuals observed in B

<math>S_{12\left(obs\right)}</math> = number of shared OTUs in A and B.

Calculation of the <math>S_{A,B Chao}</math> requires the number of OTUs where only one sequence was observed from each library, <math>f_{11}</math>. For our example case, <math>f_{11}</math> is 2. Plugging the f-values and <math>S_{12\left( obs \right )}\mbox{into } S_{A,B Chao}</math> yields a value of 76.6667, which matches the value in <math>S_{A,B Chao}</math> of the table above.

**File Samples on the Eckburg 70.stool_compare Dataset**

- .shared

This file contains the frequency of sequences from each group found in each OTU. Each row consists of the distance being considered, group name, number of OTUS, and the abundance information separated by tabs. Note: only the line for distance 0.03 are shown below. The abundance information is as follows. Each subsequent number represents a different OTU so that the number indicates the number of sequences in that group that clustered within that OTU. Note that OTU frequencies can only be compared within a distance definition.

0.03 stool 110 174 27 5 127 7 1 46 10 25 39 23 57 12 9 4 36 48 48 75 29 23 45 10 5 5 2 3 11 6 1 2 11 12 1 2 11 1 2 2 7 1 4 6 14 1 4 4 2 1 1 6 1 6 2 2 2 1 1 2 1 3 4 3 3 1 1 2 2 1 1 1 1 2 1 1 2 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 tissue 110 1135 91 2 6 4 4 129 0 21 137 4 51 8 92 0 29 25 10 248 63 410 42 26 31 1 3 9 25 0 0 1 0 6 10 0 8 12 1 36 9 0 3 18 30 0 24 0 0 34 0 6 11 42 0 55 0 0 26 2 4 8 3 0 0 0 0 2 25 29 13 7 0 15 1 0 5 3 1 0 32 4 5 2 11 3 51 43 22 1 1 4 1 1 1 1 2 7 1 1 1 7 1 3 1 1 1 2 63 1 1

- .sharedChao

The first line contains the labels of all the columns. First sampled which shows the frequency of the <math>S_{A,B Chao}</math> calculations. The frequency was set to 500, so after each 500 selected the <math>S_{A,B Chao}</math> is calculated at each of the distances, with a calculation done after all are sampled. The following labels in the first line are the distances at which the calculations were made and the names of the groups compared. Each additional line starts with the number of sequences sampled followed by the <math>S_{A,B Chao}</math> calculation at the column's distance. For instance, at distance 0.01, after 4392 samples <math>S_{A,B Chao}</math> was 152.768.

sampled 0.00tissuestool 0.01tissuestool 0.02tissuestool 0.03tissuestool 1 0 0 0 0 500 52.1857 50.25 67.5 43.5417 1000 86.0812 83.9 57.1833 62 1500 116.479 88.9489 78.6136 56.0167 2000 171.833 113.836 116.533 66.8958 2500 208.426 120.216 105.983 57.5714 3000 172.043 101.769 92.8631 69.25 3500 130.987 210.038 118.833 104.517 4000 210.174 141.034 107.885 59.8214 4392 233.296 152.768 110.364 76.6667