The corr.axes command will calculate the correlation coefficient for each column in a shared/relabund file to the axes displayed in a pcoa file.

Default settings

The corr.axes command reads a shared, relabund or metadata file as well as an axes file. If a shared file is given, the relabund is calculated. A metadata file has the same number of rows as samples, but the column(s) are floats that describe the samples (e.g. temperature, weight, etc.)

mothur > corr.axes(shared=genus.pool.shared,


mothur > corr.axes(relabund=genus.pool.relabund,


 mothur > corr.axes(metadata=genus.pool.metadata,



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 the first distance is used.


The method parameter allows you to select what method you would like to use. Options are pearson (default), spearman and kendall.

To use the spearman method:

mothur > corr.axes(metadata=genus.pool.metadata,, method=spearman)

or to use the kendall method:

mothur > corr.axes(metadata=genus.pool.metadata,, method=kendall)


The numaxes parameter allows you to select the number of axes you would like to use. Default=3.

mothur > corr.axes(metadata=genus.pool.metadata,, numaxes=2)


  • 1.24.0 - added p_values.
  • 1.25.0 - fixed OTU labels.
  • 1.40.0 - Speed and memory improvements for shared files. #357 , #347
  • 1.44.0 - Fixes corr.axes bug when metadata files contain zeroed columns.