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

Returns
-------
visualization : Visualization