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


From mothur
Jump to: navigation, search

The otu.association command calculate the correlation coefficient for the otus in a shared/relabund file.

Default settings

The otu.association command reads a shared or relabund file.

mothur > otu.association(shared=final.an.0.03.subsample.0.03.pick.shared)


mothur > otu.association(relabund=final.an.0.03.subsample.0.03.pick.relabund)

The output file will look like:

OTUA	OTUB	spearmanCoef	Significance
Otu002	Otu001	-0.066667	0.841481
Otu003	Otu001	-0.006061	0.985494
Otu003	Otu002	0.006061	0.985494
Otu004	Otu001	-0.151515	0.649436
Otu004	Otu002	0.078788	0.813151
Otu004	Otu003	0.903030	0.000344
Otu005	Otu001	-0.127273	0.702596
Otu005	Otu002	-0.636364	0.047890
Otu005	Otu003	-0.284848	0.392803



The groups parameter allows you to specify which of the groups you would like included. The group names are separated by dashes. By default all groups in the shared or relabund file are used.


The label parameter allows you to select what distance level you would like used, if none is given all labels are processed.


The method parameter allows you to select what method you would like to use. Options are pearson, spearman and kendall. Default=pearson - http://en.wikipedia.org/wiki/Pearson_correlation_coefficient

To use the spearman method: - http://en.wikipedia.org/wiki/Spearman's_rank_correlation_coefficient

mothur > otu.association(shared=final.an.0.03.subsample.0.03.pick.shared, method=spearman)

or to use the kendall method: - http://en.wikipedia.org/wiki/Kendall_tau_rank_correlation_coefficient

mothur > otu.association(shared=final.an.0.03.subsample.0.03.pick.shared, method=kendall)


The metadata parameter allows you to find the association between the otus and the metadata.

mothur > otu.association(shared=final.an.0.03.subsample.0.03.pick.shared, metadata=mouse.dpw.metadata)


The cutoff parameter allows you to set a pvalue at which the otu will be reported.

mothur > otu.association(shared=final.an.0.03.subsample.0.03.pick.shared, metadata=mouse.dpw.metadata, cutoff=0.005)