grassp.pl.protein_clustermap

grassp.pl.protein_clustermap#

protein_clustermap(data, annotation_key, distance_metric='correlation', linkage_method='average', linkage_metric='cosine', palette='Blues_r', show=True)[source]#

Create a clustered heatmap of protein distances with annotations.

Parameters:
data AnnData

Annotated data matrix with proteins as observations (rows)

annotation_key str

Key in data.obs for annotating proteins

distance_metric Literal['euclidean', 'cosine', 'correlation', 'cityblock', 'jaccard', 'hamming'] (default: 'correlation')

Distance metric to use for calculating pairwise distances between proteins. One of ‘euclidean’, ‘cosine’, ‘correlation’, ‘cityblock’, ‘jaccard’, ‘hamming’

linkage_method Literal['single', 'complete', 'average', 'weighted', 'centroid', 'median', 'ward'] (default: 'average')

Method for hierarchical clustering. One of ‘single’, ‘complete’, ‘average’, ‘weighted’, ‘centroid’, ‘median’, ‘ward’

linkage_metric Literal['euclidean', 'cosine', 'correlation', 'cityblock', 'jaccard', 'hamming'] (default: 'cosine')

Distance metric to use for hierarchical clustering. One of ‘euclidean’, ‘cosine’, ‘correlation’, ‘cityblock’, ‘jaccard’, ‘hamming’

palette default: 'Blues_r'

Color palette for the heatmap. Default is ‘Blues_r’

show bool (default: True)

If True, display the heatmap. If False, return the Axes object.

Return type:

None

Returns:

None Displays the clustered heatmap