Warning
This site has been replaced by the new QIIME 2 “amplicon distribution” documentation, as of the 2025.4 release of QIIME 2. You can still access the content from the “old docs” here for the QIIME 2 2024.10 and earlier releases, but we recommend that you transition to the new documentation at https://amplicon-docs.qiime2.org. Content on this site is no longer updated and may be out of date.
Are you looking for:
the QIIME 2 homepage? That’s https://qiime2.org.
learning resources for microbiome marker gene (i.e., amplicon) analysis? See the QIIME 2 amplicon distribution documentation.
learning resources for microbiome metagenome analysis? See the MOSHPIT documentation.
installation instructions, plugins, books, videos, workshops, or resources? See the QIIME 2 Library.
general help? See the QIIME 2 Forum.
Old content beyond this point… 👴👵
heatmap: Generate heatmap of important features.¶
Docstring:
Usage: qiime sample-classifier heatmap [OPTIONS] Generate a heatmap of important features. Features are filtered based on importance scores; samples are optionally grouped by sample metadata; and a heatmap is generated that displays (normalized) feature abundances per sample. Inputs: --i-table ARTIFACT FeatureTable[Frequency | RelativeFrequency | PresenceAbsence | Composition] Feature table containing all features that should be used for target prediction. [required] --i-importance ARTIFACT FeatureData[Importance] Feature importances. [required] Parameters: --m-sample-metadata-file METADATA --m-sample-metadata-column COLUMN MetadataColumn[Categorical] Sample metadata column to use for sample labeling or grouping. [optional] --m-feature-metadata-file METADATA --m-feature-metadata-column COLUMN MetadataColumn[Categorical] Feature metadata (e.g., taxonomy) to use for labeling features in the heatmap. [optional] --p-feature-count INTEGER Range(0, None) Filter feature table to include top N most important features. Set to zero to include all features. [default: 50] --p-importance-threshold NUMBER Range(0, None) Filter feature table to exclude any features with an importance score less than this threshold. Set to zero to include all features. [default: 0] --p-group-samples / --p-no-group-samples Group samples by sample metadata. [default: False] --p-normalize / --p-no-normalize Normalize the feature table by adding a psuedocount of 1 and then taking the log10 of the table. [default: True] --p-missing-samples TEXT Choices('error', 'ignore') How to handle missing samples in metadata. "error" will fail if missing samples are detected. "ignore" will cause the feature table and metadata to be filtered, so that only samples found in both files are retained. [default: 'ignore'] --p-metric TEXT Choices('braycurtis', 'canberra', 'chebyshev', 'cityblock', 'correlation', 'cosine', 'dice', 'euclidean', 'hamming', 'jaccard', 'kulsinski', 'mahalanobis', 'matching', 'minkowski', 'rogerstanimoto', 'russellrao', 'seuclidean', 'sokalmichener', 'sokalsneath', 'sqeuclidean', 'yule') Metrics exposed by seaborn (see http://seaborn.pydata.org/generated/seaborn.clusterm ap.html#seaborn.clustermap for more detail). [default: 'braycurtis'] --p-method TEXT Choices('average', 'centroid', 'complete', 'median', 'single', 'ward', 'weighted') Clustering methods exposed by seaborn (see http://seaborn.pydata.org/generated/seaborn.clusterm ap.html#seaborn.clustermap for more detail). [default: 'average'] --p-cluster TEXT Choices('both', 'features', 'none', 'samples') Specify which axes to cluster. [default: 'features'] --p-color-scheme TEXT Choices('Accent', 'Accent_r', 'Blues', 'Blues_r', 'BrBG', 'BrBG_r', 'BuGn', 'BuGn_r', 'BuPu', 'BuPu_r', 'CMRmap', 'CMRmap_r', 'Dark2', 'Dark2_r', 'GnBu', 'GnBu_r', 'Greens', 'Greens_r', 'Greys', 'Greys_r', 'OrRd', 'OrRd_r', 'Oranges', 'Oranges_r', 'PRGn', 'PRGn_r', 'Paired', 'Paired_r', 'Pastel1', 'Pastel1_r', 'Pastel2', 'Pastel2_r', 'PiYG', 'PiYG_r', 'PuBu', 'PuBuGn', 'PuBuGn_r', 'PuBu_r', 'PuOr', 'PuOr_r', 'PuRd', 'PuRd_r', 'Purples', 'Purples_r', 'RdBu', 'RdBu_r', 'RdGy', 'RdGy_r', 'RdPu', 'RdPu_r', 'RdYlBu', 'RdYlBu_r', 'RdYlGn', 'RdYlGn_r', 'Reds', 'Reds_r', 'Set1', 'Set1_r', 'Set2', 'Set2_r', 'Set3', 'Set3_r', 'Spectral', 'Spectral_r', 'Vega10', 'Vega10_r', 'Vega20', 'Vega20_r', 'Vega20b', 'Vega20b_r', 'Vega20c', 'Vega20c_r', 'Wistia', 'Wistia_r', 'YlGn', 'YlGnBu', 'YlGnBu_r', 'YlGn_r', 'YlOrBr', 'YlOrBr_r', 'YlOrRd', 'YlOrRd_r', 'afmhot', 'afmhot_r', 'autumn', 'autumn_r', 'binary', 'binary_r', 'bone', 'bone_r', 'brg', 'brg_r', 'bwr', 'bwr_r', 'cividis', 'cividis_r', 'cool', 'cool_r', 'coolwarm', 'coolwarm_r', 'copper', 'copper_r', 'cubehelix', 'cubehelix_r', 'flag', 'flag_r', 'gist_earth', 'gist_earth_r', 'gist_gray', 'gist_gray_r', 'gist_heat', 'gist_heat_r', 'gist_ncar', 'gist_ncar_r', 'gist_rainbow', 'gist_rainbow_r', 'gist_stern', 'gist_stern_r', 'gist_yarg', 'gist_yarg_r', 'gnuplot', 'gnuplot2', 'gnuplot2_r', 'gnuplot_r', 'gray', 'gray_r', 'hot', 'hot_r', 'hsv', 'hsv_r', 'icefire', 'icefire_r', 'inferno', 'inferno_r', 'jet', 'jet_r', 'magma', 'magma_r', 'mako', 'mako_r', 'nipy_spectral', 'nipy_spectral_r', 'ocean', 'ocean_r', 'pink', 'pink_r', 'plasma', 'plasma_r', 'prism', 'prism_r', 'rainbow', 'rainbow_r', 'rocket', 'rocket_r', 'seismic', 'seismic_r', 'spectral', 'spectral_r', 'spring', 'spring_r', 'summer', 'summer_r', 'tab10', 'tab10_r', 'tab20', 'tab20_r', 'tab20b', 'tab20b_r', 'tab20c', 'tab20c_r', 'terrain', 'terrain_r', 'viridis', 'viridis_r', 'vlag', 'vlag_r', 'winter', 'winter_r') Color scheme for heatmap. [default: 'rocket'] Outputs: --o-heatmap VISUALIZATION Heatmap of important features. [required] --o-filtered-table ARTIFACT FeatureTable[Frequency] Filtered feature table containing data displayed in heatmap. [required] Miscellaneous: --output-dir PATH Output unspecified results to a directory --verbose / --quiet Display verbose output to stdout and/or stderr during execution of this action. Or silence output if execution is successful (silence is golden). --recycle-pool TEXT Use a cache pool for pipeline resumption. QIIME 2 will cache your results in this pool for reuse by future invocations. These pool are retained until deleted by the user. If not provided, QIIME 2 will create a pool which is automatically reused by invocations of the same action and removed if the action is successful. Note: these pools are local to the cache you are using. --no-recycle Do not recycle results from a previous failed pipeline run or save the results from this run for future recycling. --parallel Execute your action in parallel. This flag will use your default parallel config. --parallel-config FILE Execute your action in parallel using a config at the indicated path. --example-data PATH Write example data and exit. --citations Show citations and exit. --use-cache DIRECTORY Specify the cache to be used for the intermediate work of this action. If not provided, the default cache under $TMP/qiime2/will be used. IMPORTANT FOR HPC USERS: If you are on an HPC system and are using parallel execution it is important to set this to a location that is globally accessible to all nodes in the cluster. --help Show this message and exit.
Import:
from qiime2.plugins.sample_classifier.pipelines import heatmap
Docstring:
Generate heatmap of important features. Generate a heatmap of important features. Features are filtered based on importance scores; samples are optionally grouped by sample metadata; and a heatmap is generated that displays (normalized) feature abundances per sample. Parameters ---------- table : FeatureTable[Frequency | RelativeFrequency | PresenceAbsence | Composition] Feature table containing all features that should be used for target prediction. importance : FeatureData[Importance] Feature importances. sample_metadata : MetadataColumn[Categorical], optional Sample metadata column to use for sample labeling or grouping. feature_metadata : MetadataColumn[Categorical], optional Feature metadata (e.g., taxonomy) to use for labeling features in the heatmap. feature_count : Int % Range(0, None), optional Filter feature table to include top N most important features. Set to zero to include all features. importance_threshold : Float % Range(0, None), optional Filter feature table to exclude any features with an importance score less than this threshold. Set to zero to include all features. group_samples : Bool, optional Group samples by sample metadata. normalize : Bool, optional Normalize the feature table by adding a psuedocount of 1 and then taking the log10 of the table. missing_samples : Str % Choices('error', 'ignore'), optional How to handle missing samples in metadata. "error" will fail if missing samples are detected. "ignore" will cause the feature table and metadata to be filtered, so that only samples found in both files are retained. metric : Str % Choices('braycurtis', 'canberra', 'chebyshev', 'cityblock', 'correlation', 'cosine', 'dice', 'euclidean', 'hamming', 'jaccard', 'kulsinski', 'mahalanobis', 'matching', 'minkowski', 'rogerstanimoto', 'russellrao', 'seuclidean', 'sokalmichener', 'sokalsneath', 'sqeuclidean', 'yule'), optional Metrics exposed by seaborn (see http://seaborn.pydata.org/generated/sea born.clustermap.html#seaborn.clustermap for more detail). method : Str % Choices('average', 'centroid', 'complete', 'median', 'single', 'ward', 'weighted'), optional Clustering methods exposed by seaborn (see http://seaborn.pydata.org/ge nerated/seaborn.clustermap.html#seaborn.clustermap for more detail). cluster : Str % Choices('both', 'features', 'none', 'samples'), optional Specify which axes to cluster. color_scheme : Str % Choices('Accent', 'Accent_r', 'Blues', 'Blues_r', 'BrBG', 'BrBG_r', 'BuGn', 'BuGn_r', 'BuPu', 'BuPu_r', 'CMRmap', 'CMRmap_r', 'Dark2', 'Dark2_r', 'GnBu', 'GnBu_r', 'Greens', 'Greens_r', 'Greys', 'Greys_r', 'OrRd', 'OrRd_r', 'Oranges', 'Oranges_r', 'PRGn', 'PRGn_r', 'Paired', 'Paired_r', 'Pastel1', 'Pastel1_r', 'Pastel2', 'Pastel2_r', 'PiYG', 'PiYG_r', 'PuBu', 'PuBuGn', 'PuBuGn_r', 'PuBu_r', 'PuOr', 'PuOr_r', 'PuRd', 'PuRd_r', 'Purples', 'Purples_r', 'RdBu', 'RdBu_r', 'RdGy', 'RdGy_r', 'RdPu', 'RdPu_r', 'RdYlBu', 'RdYlBu_r', 'RdYlGn', 'RdYlGn_r', 'Reds', 'Reds_r', 'Set1', 'Set1_r', 'Set2', 'Set2_r', 'Set3', 'Set3_r', 'Spectral', 'Spectral_r', 'Vega10', 'Vega10_r', 'Vega20', 'Vega20_r', 'Vega20b', 'Vega20b_r', 'Vega20c', 'Vega20c_r', 'Wistia', 'Wistia_r', 'YlGn', 'YlGnBu', 'YlGnBu_r', 'YlGn_r', 'YlOrBr', 'YlOrBr_r', 'YlOrRd', 'YlOrRd_r', 'afmhot', 'afmhot_r', 'autumn', 'autumn_r', 'binary', 'binary_r', 'bone', 'bone_r', 'brg', 'brg_r', 'bwr', 'bwr_r', 'cividis', 'cividis_r', 'cool', 'cool_r', 'coolwarm', 'coolwarm_r', 'copper', 'copper_r', 'cubehelix', 'cubehelix_r', 'flag', 'flag_r', 'gist_earth', 'gist_earth_r', 'gist_gray', 'gist_gray_r', 'gist_heat', 'gist_heat_r', 'gist_ncar', 'gist_ncar_r', 'gist_rainbow', 'gist_rainbow_r', 'gist_stern', 'gist_stern_r', 'gist_yarg', 'gist_yarg_r', 'gnuplot', 'gnuplot2', 'gnuplot2_r', 'gnuplot_r', 'gray', 'gray_r', 'hot', 'hot_r', 'hsv', 'hsv_r', 'icefire', 'icefire_r', 'inferno', 'inferno_r', 'jet', 'jet_r', 'magma', 'magma_r', 'mako', 'mako_r', 'nipy_spectral', 'nipy_spectral_r', 'ocean', 'ocean_r', 'pink', 'pink_r', 'plasma', 'plasma_r', 'prism', 'prism_r', 'rainbow', 'rainbow_r', 'rocket', 'rocket_r', 'seismic', 'seismic_r', 'spectral', 'spectral_r', 'spring', 'spring_r', 'summer', 'summer_r', 'tab10', 'tab10_r', 'tab20', 'tab20_r', 'tab20b', 'tab20b_r', 'tab20c', 'tab20c_r', 'terrain', 'terrain_r', 'viridis', 'viridis_r', 'vlag', 'vlag_r', 'winter', 'winter_r'), optional Color scheme for heatmap. Returns ------- heatmap : Visualization Heatmap of important features. filtered_table : FeatureTable[Frequency] Filtered feature table containing data displayed in heatmap.