Fork me on GitHub

heatmap: Generate a heatmap representation of a feature table

Citations
  • John D. Hunter. Matplotlib: a 2d graphics environment. Computing in Science & Engineering, 9(3):90–95, 2007. doi:10.1109/MCSE.2007.55.

Docstring:

Usage: qiime feature-table heatmap [OPTIONS]

  Generate a heatmap representation of a feature table with optional
  clustering on both the sample and feature axes.

  Tip: To generate a heatmap containing taxonomic annotations, use `qiime taxa
  collapse` to collapse the feature table at the desired taxonomic level.

Inputs:
  --i-table ARTIFACT FeatureTable[Frequency]
                         The feature table to visualize.            [required]
Parameters:
  --m-sample-metadata-file METADATA
  --m-sample-metadata-column COLUMN  MetadataColumn[Categorical]
                         Annotate the sample IDs with these sample metadata
                         values. When metadata is present and
                         `cluster`='feature', samples will be sorted by the
                         metadata values.                           [optional]
  --m-feature-metadata-file METADATA
  --m-feature-metadata-column COLUMN  MetadataColumn[Categorical]
                         Annotate the feature IDs with these feature metadata
                         values. When metadata is present and
                         `cluster`='sample', features will be sorted by the
                         metadata values.                           [optional]
  --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-title TEXT         Optional custom plot title.                [optional]
  --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.clusterma
                         p.html#seaborn.clustermap for more detail).
                                                        [default: 'euclidean']
  --p-method TEXT Choices('average', 'centroid', 'complete', 'median',
    'single', 'ward', 'weighted')
                         Clustering methods exposed by seaborn (see
                         http://seaborn.pydata.org/generated/seaborn.clusterma
                         p.html#seaborn.clustermap for more detail).
                                                          [default: 'average']
  --p-cluster TEXT Choices('both', 'features', 'none', 'samples')
                         Specify which axes to cluster.      [default: 'both']
  --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')
                         The matplotlib colorscheme to generate the heatmap
                         with.                             [default: 'rocket']
Outputs:
  --o-visualization VISUALIZATION
                                                                    [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).
  --example-data PATH    Write example data and exit.
  --citations            Show citations and exit.
  --help                 Show this message and exit.

Import:

from qiime2.plugins.feature_table.visualizers import heatmap

Docstring:

Generate a heatmap representation of a feature table

Generate a heatmap representation of a feature table with optional
clustering on both the sample and feature axes.  Tip: To generate a heatmap
containing taxonomic annotations, use `qiime taxa collapse` to collapse the
feature table at the desired taxonomic level.

Parameters
----------
table : FeatureTable[Frequency]
    The feature table to visualize.
sample_metadata : MetadataColumn[Categorical], optional
    Annotate the sample IDs with these sample metadata values. When
    metadata is present and `cluster`='feature', samples will be sorted by
    the metadata values.
feature_metadata : MetadataColumn[Categorical], optional
    Annotate the feature IDs with these feature metadata values. When
    metadata is present and `cluster`='sample', features will be sorted by
    the metadata values.
normalize : Bool, optional
    Normalize the feature table by adding a psuedocount of 1 and then
    taking the log10 of the table.
title : Str, optional
    Optional custom plot title.
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
    The matplotlib colorscheme to generate the heatmap with.

Returns
-------
visualization : Visualization