News and Announcements » |
Description:
This script generates 2D PCoA plots using the principal coordinates file generated by performing beta diversity measures of an OTU table.
Usage: make_2d_plots.py [options]
Input Arguments:
Note
[REQUIRED]
[OPTIONAL]
Output:
This script generates an output folder, which contains several files. To best view the 2D plots, it is recommended that the user views the _pca_2D.html file.
Default Example:
If you just want to use the default output, you can supply the principal coordinates file (i.e., resulting file from principal_coordinates.py), where the default coloring will be based on the SampleID as follows:
make_2d_plots.py -i beta_div_coords.txt -m Mapping_file.txt
Output Directory Usage:
If you want to give an specific output directory (e.g. “2d_plots”), use the following code.
make_2d_plots.py -i beta_div_coords.txt -o 2d_plots/
Mapping File Usage:
Additionally, the user can supply their mapping file (“-m”) and a specific category to color by (“-b”) or any combination of categories. When using the -b option, the user can specify the coloring for multiple mapping labels, where each mapping label is separated by a comma, for example: -b ‘mapping_column1,mapping_column2’. The user can also combine mapping labels and color by the combined label that is created by inserting an ‘&&’ between the input columns, for example: -b ‘mapping_column1&&mapping_column2’.
If the user wants to color by specific mapping labels, they can use the following code:
make_2d_plots.py -i beta_div_coords.txt -m Mapping_file.txt -b 'mapping_column'
If the user would like to color all categories in their metadata mapping file, they can pass ‘ALL’ to the ‘-b’ option, as follows:
make_2d_plots.py -i beta_div_coords.txt -m Mapping_file.txt -b ALL
Prefs File:
The user can supply a prefs file to color by, as follows:
make_2d_plots.py -i beta_div_coords.txt -m Mapping_file.txt -p prefs.txt
Jackknifed Principal Coordinates (w/ confidence intervals):
If you have created jackknifed PCoA files, you can pass the folder containing those files, instead of a single file. The user can also specify the opacity of the ellipses around each point “–ellipsoid_opacity”, which is a value from 0-1. Currently there are two metrics “–ellipsoid_method” that can be used for generating the ellipsoids, which are ‘IQR’ and ‘sdev’. The user can specify all of these options as follows:
make_2d_plots.py -i jackknifed_pcoas/ -m Mapping_file.txt -b 'mapping_column1,mapping_column1&&mapping_column2' --ellipsoid_opacity=0.5 --ellipsoid_method=IQR