pc_correlation_heatmap

pylluminator.visualizations.pc_correlation_heatmap(samples: Samples, params: list[str] | None = None, nb_probes: int | None = None, apply_mask=True, custom_sheet: None | DataFrame = None, abs_corr=True, save_path: None | str = None, model='PCA', orientation='v', **kwargs)

Heatmap of the correlation between principal components and the metadata of the sample sheet.

Parameters:
  • samples (Samples) – samples to plot

  • params (list[str] | None) – list of parameters to correlate with the principal components. Must be columns of the sample sheet. If None, show all parameters. Default: None

  • nb_probes (int | None) – number of probes to use for the model, selected from the probes with the most beta variance. If None, use all the probes. Default: None

  • apply_mask (bool) – True removes masked probes from betas, False keeps them. Default: True

  • custom_sheet (pandas.DataFrame | None) – a sample sheet to use. By default, use the samples’ sheet. Useful if you want to filter the samples to display. Default: None

  • abs_corr (bool) – if True, show the absolute value of the correlation. Default: True

  • save_path (str | None) – if set, save the graph to save_path. Default: None

  • model (str) – identifier of the model to use. Available models are ‘PCA’: PCA, ‘MDS’: MDS, ‘DL’: DictionaryLearning, ‘FA’: FactorAnalysis, ‘FICA’: FastICA, ‘IPCA’: IncrementalPCA, ‘KPCA’: KernelPCA, ‘LDA’: LatentDirichletAllocation, ‘MBDL’: MiniBatchDictionaryLearning, ‘MBNMF’: MiniBatchNMF, ‘MBSPCA’: MiniBatchSparsePCA, ‘NMF’: NMF, ‘SPCA’: SparsePCA, ‘TSVD’: TruncatedSVD. Default: ‘PCA’

  • orientation (str) – orientation of the heatmap. Possible values: ‘v’, ‘h’. Default: ‘v’

  • kwargs – parameters passed to the model

Returns:

None