pc_association_heatmap
- pylluminator.visualizations.pc_association_heatmap(samples: Samples, params: list[str] | None = None, nb_probes: int | None = None, apply_mask=True, vmax=0.05, custom_sheet: None | DataFrame = None, save_path: None | str = None, model='PCA', orientation='v', **kwargs)
Heatmap of the p-values for the association of principal components and the parameters in 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
vmax (float) – maximum value for the color scale. Default: 0.05
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
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