Hi @hsapers!
Let's take a peek at the docs for the heatmap
visualizer:
--p-metric TEXT Choices('canberra', 'correlation', 'jaccard',
'cityblock', 'kulsinski', 'hamming', 'sokalsneath', 'mahalanobis', 'dice',
'minkowski', 'cosine', 'matching', 'euclidean', 'sqeuclidean',
'sokalmichener', 'rogerstanimoto', 'russellrao', 'seuclidean',
'braycurtis', '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('average', 'complete', 'weighted', 'centroid',
'single', 'ward', 'median')
Clustering methods exposed by seaborn (see
http://seaborn.pydata.org/generated/seaborn.clusterma
p.html#seaborn.clustermap for more detail).
[default: 'average']
Okay, focusing in on the method
parameter for now, let's check out that link:
http://seaborn.pydata.org/generated/seaborn.clustermap.html#seaborn.clustermap
Linkage method to use for calculating clusters. See scipy.cluster.hierarchy.linkage()
documentation for more information.
Wow, this is turning into a game of telephone. Let's check out that scipy link in there:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.cluster.hierarchy.linkage.html#scipy.cluster.hierarchy.linkage
Okay, now that we have some docs on hand:
I don't think that's always the case. Let's put it this way, this QIIME 2 plugin is not computing the metric before handing off the data to seaborn to plot, we're just exposing the seaborn function here. According to the scipy docs:
metric str or function, optional
The distance metric to use in the case that y is a collection of observation vectors; ignored otherwise. See the pdist
function for a list of valid distance metrics. A custom distance function can also be used.
So the metric is only used as part of the clustering algorithm, and isn't applied to the final table.
It depends on which axis you choose to cluster on:
--p-cluster TEXT Choices('features', 'both', 'none', 'samples')
Specify which axes to cluster. [default: 'both']
Hope that helps! Sorry for the game of telephone with the docs...
:qiime2: