rnalysis.filtering.CountFilter.clustergram

CountFilter.clustergram(sample_names: Union[ColumnNames, Literal['all']] = 'all', metric: str = 'Euclidean', linkage: Literal['Single', 'Average', 'Complete', 'Ward', 'Weighted', 'Centroid', 'Median'] = 'Average', title: Union[str, Literal['auto']] = 'auto', title_fontsize: float = 20, tick_fontsize: float = 12, colormap: ColorMap = 'inferno', colormap_label: str = '$\\log_2$(Normalized reads + 1)') Figure

Performs hierarchical clustering and plots a clustergram on the base-2 log of a given set of samples.

Parameters
  • sample_names ('all' or list.) – the names of the relevant samples in a list. Example input: [“condition1_rep1”, “condition1_rep2”, “condition1_rep3”, “condition2_rep1”, “condition3_rep1”, “condition3_rep2”]

  • metric ('Euclidean', 'hamming', 'correlation', or any other distance metric available in scipy.spatial.distance.pdist) – the distance metric to use in the clustergram. For all possible inputs and their meaning see scipy.spatial.distance.pdist documentation online.

  • linkage ('single', 'average', 'complete', 'weighted', 'centroid', 'median' or 'ward'.) – the linkage method to use in the clustergram. For all possible inputs and their meaning see scipy.cluster.hierarchy.linkage documentation online.

  • title (str or 'auto' (default='auto')) – The title of the plot. If ‘auto’, a title will be generated automatically.

  • title_fontsize (float (default=30)) – determines the font size of the graph title.

  • tick_fontsize (float (default=10)) – determines the font size of the X and Y tick labels.

Return type

A matplotlib Figure.

_images/clustergram.png

Example plot of clustergram()