News and Announcements » |
Description:
To visualize the distance between samples and/or categories in the metadata mapping file, the user can generate histograms to represent the distances between samples. This script generates an HTML file, where the user can compare the distances between samples based on the different categories associated to each sample in the metadata mapping file.
Usage: make_distance_histograms.py [options]
Input Arguments:
Note
[REQUIRED]
[OPTIONAL]
Output:
The result of this script will be a folder containing images and/or an html file (with appropriate javascript files), depending on the user-defined parameters.
Examples:
Distance Histograms are a way to compare different categories and see which tend to have larger/smaller distances than others. For example, in the hand study, you may want to compare the distances between hands to the distances between individuals (with the file “hand_distances.txt” using the parameter -d hand_distances.txt). The categories are defined in the metadata mapping file (specified using the parameter -m hand_map.txt). If you want to look at the distances between hands and individuals, choose the “Hand” field and “Individual” field (using the parameter –fields Hand,Individual (notice the fields are comma delimited)). For each of these groups of distances a histogram is made. The output is a HTML file which is created in the “Distance_Histograms” directory (using the parameter -o Distance_Histograms to specify output directory) where you can look at all the distance histograms individually, and compare them between each other.
In the following command, the user only supplies a distance matrix (i.e. resulting file from beta_diversity.py), the user-generated metadata mapping file and one category (e.g. pH):
make_distance_histograms.py -d beta_div.txt -m Mapping_file.txt --fields pH
For comparison of multiple categories (e.g. pH, salinity), you can use the following command:
make_distance_histograms.py -d beta_div.txt -m Mapping_file.txt --fields pH,salinity
HTML output is automatically generated. If the user would like to suppress the HTML output, you can use the following command:
make_distance_histograms.py -d beta_div.txt -m Mapping_file.txt --fields pH --suppress_html_output
In the case that the user generates their own preferences file (prefs.txt), they can use the following command:
make_distance_histograms.py -d beta_div.txt -m Mapping_file.txt -p prefs.txt
Note: In the case that a preferences file is passed, the user does not need to supply fields in the command-line.