episcanpy.api.pp.correlation_pc

episcanpy.api.pp.correlation_pc(adata, variable, pc=1, obs=True, method='pearson', title=None, xlabel=None, ylabel=None, show=True, save=None)

Correlation between a given PC and a covariate. If show == True, plot a scatter plot. If obs == True, consider a obs covariate. Else, take a variable covariate. Available methods for correlation: ‘pearson’ or ‘spearman’

Parameters
adata : input adata

variable : covariate either saved in obs or var

obs : Boolean that specify if the covariate is stored in obs or in var.

later version : In

parameter will not need to be specified : this

method : 'pearson' or 'spearman' available - scipy.stats implementation

title : optional title to the plot

xlabel : optional xlabel

ylabel : optional ylabel

show : Print the correlation coefficient and p-value. Additionaly, plot a scatter plot

the PC coordinate and the covariate value for every cell or feature in your matrix : of

save : if specified the name of the picture, save as png

Returns

correlation coefficient and p-value