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('hamming', 'canberra', 'dice', 'mahalanobis',
    'braycurtis', 'kulsinski', 'matching', 'sqeuclidean', 'seuclidean',
    'cityblock', 'russellrao', 'cosine', 'rogerstanimoto', 'sokalmichener',
    'minkowski', 'sokalsneath', 'jaccard', 'euclidean', 'correlation', 'yule',
    'chebyshev')         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('complete', 'average', 'single', 'median',
    'centroid', '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', 'samples', 'features', 'none')
                         Specify which axes to cluster.      [default: 'both']
  --p-color-scheme TEXT Choices('gist_rainbow', 'Vega20c', 'spectral',
    'rocket', 'inferno_r', 'RdGy_r', 'pink_r', 'vlag_r', 'Dark2', 'CMRmap_r',
    'Oranges', 'cividis_r', 'cividis', 'copper_r', 'bwr', 'gnuplot',
    'Pastel1_r', 'Set3', 'Paired', 'gnuplot2_r', 'tab20c', 'ocean_r',
    'cubehelix', 'autumn', 'jet_r', 'rocket_r', 'Spectral_r', 'YlOrRd',
    'PuRd_r', 'bone_r', 'hot', 'Vega20', 'BuPu_r', 'PuBu', 'gist_gray_r',
    'spectral_r', 'coolwarm', 'Spectral', 'pink', 'GnBu_r', 'Greys', 'summer',
    'hot_r', 'gist_ncar', 'summer_r', 'gist_stern_r', 'tab20b', 'Reds_r',
    'PRGn_r', 'RdYlBu', 'YlOrBr_r', 'OrRd_r', 'Paired_r', 'nipy_spectral',
    'tab10_r', 'Vega20_r', 'afmhot', 'gray_r', 'cool_r', 'ocean', 'RdBu',
    'hsv_r', 'YlGnBu', 'viridis_r', 'spring_r', 'hsv', 'tab10',
    'nipy_spectral_r', 'terrain_r', 'winter_r', 'PuBu_r', 'tab20', 'OrRd',
    'jet', 'gist_earth_r', 'PRGn', 'prism', 'Purples', 'flag_r',
    'cubehelix_r', 'Greens', 'Set2', 'gist_heat', 'binary_r', 'Greys_r',
    'GnBu', 'tab20_r', 'magma', 'YlOrBr', 'Accent_r', 'bone', 'gist_gray',
    'RdPu_r', 'terrain', 'gist_ncar_r', 'mako_r', 'PuBuGn', 'brg',
    'icefire_r', 'RdBu_r', 'cool', 'PuRd', 'gnuplot2', 'Pastel2', 'inferno',
    'BuPu', 'PuOr_r', 'Purples_r', 'RdYlBu_r', 'icefire', 'PuBuGn_r',
    'Accent', 'tab20b_r', 'BuGn', 'Vega20b', 'RdYlGn', 'CMRmap', 'Vega10_r',
    'plasma_r', 'YlGn', 'gist_heat_r', 'autumn_r', 'flag', 'Pastel1',
    'Greens_r', 'plasma', 'bwr_r', 'tab20c_r', 'Dark2_r', 'YlGn_r',
    'RdYlGn_r', 'gist_stern', 'mako', 'Blues_r', 'gist_earth', 'vlag',
    'Vega10', 'BrBG_r', 'RdGy', 'gist_yarg_r', 'gnuplot_r', 'prism_r',
    'spring', 'Set1_r', 'gist_rainbow_r', 'gray', 'BuGn_r', 'PuOr', 'Wistia',
    'viridis', 'binary', 'YlGnBu_r', 'PiYG_r', 'rainbow_r', 'rainbow',
    'Wistia_r', 'Set2_r', 'brg_r', 'magma_r', 'Oranges_r', 'seismic',
    'coolwarm_r', 'Blues', 'Set3_r', 'gist_yarg', 'Pastel2_r', 'Vega20b_r',
    'seismic_r', 'YlOrRd_r', 'RdPu', 'Set1', 'Reds', 'PiYG', 'Vega20c_r',
    'BrBG', 'copper', 'afmhot_r', 'winter')
                         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('matching', 'euclidean', 'canberra', 'cosine', 'hamming', 'cityblock', 'sokalmichener', 'sqeuclidean', 'sokalsneath', 'mahalanobis', 'russellrao', 'braycurtis', 'yule', 'seuclidean', 'rogerstanimoto', 'correlation', 'minkowski', 'kulsinski', 'chebyshev', 'jaccard', 'dice'), optional
    Metrics exposed by seaborn (see http://seaborn.pydata.org/generated/sea
    born.clustermap.html#seaborn.clustermap for more detail).
method : Str % Choices('ward', 'complete', 'median', 'centroid', 'average', 'weighted', 'single'), 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', 'samples', 'features', 'none'), optional
    Specify which axes to cluster.
color_scheme : Str % Choices('RdGy', 'spring_r', 'cividis_r', 'YlGnBu_r', 'PuBu', 'rocket', 'mako', 'PuOr_r', 'summer', 'bone', 'BrBG_r', 'BuPu_r', 'Set3_r', 'cool_r', 'copper_r', 'OrRd', 'flag', 'inferno', 'nipy_spectral_r', 'terrain_r', 'gray_r', 'YlGnBu', 'bwr_r', 'icefire', 'gist_rainbow', 'gist_ncar_r', 'vlag_r', 'winter_r', 'Dark2_r', 'hsv_r', 'plasma', 'jet', 'jet_r', 'gist_stern', 'BuGn', 'RdYlBu', 'RdBu_r', 'Greys', 'Spectral', 'gist_heat', 'Greys_r', 'gist_yarg', 'pink_r', 'viridis_r', 'YlGn', 'Paired_r', 'summer_r', 'gray', 'BuGn_r', 'rocket_r', 'Pastel2_r', 'Vega20', 'Set1_r', 'gist_gray_r', 'gnuplot2_r', 'Vega20c', 'viridis', 'Greens', 'gist_yarg_r', 'magma', 'Pastel1', 'Dark2', 'RdBu', 'tab20', 'PiYG', 'RdYlGn_r', 'coolwarm', 'afmhot', 'YlGn_r', 'Reds_r', 'terrain', 'Wistia_r', 'PRGn_r', 'Set1', 'brg_r', 'PuBuGn', 'gnuplot2', 'nipy_spectral', 'mako_r', 'PiYG_r', 'spring', 'Reds', 'Set3', 'gnuplot_r', 'RdYlGn', 'PRGn', 'tab20c', 'RdYlBu_r', 'YlOrRd_r', 'tab10_r', 'gist_rainbow_r', 'Set2', 'autumn_r', 'seismic_r', 'Paired', 'coolwarm_r', 'rainbow_r', 'Vega10', 'magma_r', 'Oranges_r', 'cool', 'CMRmap', 'gist_gray', 'brg', 'CMRmap_r', 'ocean', 'YlOrRd', 'gist_earth', 'Pastel2', 'hot_r', 'spectral_r', 'Oranges', 'ocean_r', 'prism', 'icefire_r', 'tab20c_r', 'PuRd', 'prism_r', 'PuOr', 'PuBu_r', 'tab20b', 'binary_r', 'bone_r', 'RdPu', 'Wistia', 'Spectral_r', 'PuBuGn_r', 'Set2_r', 'Accent_r', 'Vega20_r', 'YlOrBr', 'gist_stern_r', 'Blues_r', 'BuPu', 'tab10', 'rainbow', 'Vega20c_r', 'cividis', 'Vega10_r', 'BrBG', 'Blues', 'Pastel1_r', 'Purples', 'bwr', 'hot', 'autumn', 'Accent', 'inferno_r', 'YlOrBr_r', 'seismic', 'spectral', 'PuRd_r', 'cubehelix_r', 'tab20_r', 'RdPu_r', 'Greens_r', 'gist_ncar', 'Vega20b', 'cubehelix', 'copper', 'Vega20b_r', 'binary', 'OrRd_r', 'GnBu', 'flag_r', 'plasma_r', 'tab20b_r', 'Purples_r', 'afmhot_r', 'vlag', 'pink', 'GnBu_r', 'RdGy_r', 'winter', 'gnuplot', 'gist_earth_r', 'hsv', 'gist_heat_r'), optional
    The matplotlib colorscheme to generate the heatmap with.

Returns
-------
visualization : Visualization