scparadise.scnoah.clust_diff

Contents

scparadise.scnoah.clust_diff#

scparadise.scnoah.clust_diff(adata, groupby=None, group1=None, group2=None, score1=None, score2=None, plot=True, thresh=0.02, fill=True, alpha=0.5, **kwargs)[source]#

Calculates metrics to Integral of absolute density difference and Mutual Information between two clusterings. Each metric follows the principle that the higher the value, the better the clusters separate the selected scores.

adataAnnData or MuData

Annotated data or Multimodal data.

groupbystr

The key of the grouping in AnnData.obs or MuData.obs.

group1str

Cluster in groupby.

group2str

Cluster in groupby.

score1str

Score 1 in AnnData.obs or MuData.obs calculated using scanpy.tl.score_genes.

score2str

Score 2 in AnnData.obs or MuData.obs calculated using scanpy.tl.score_genes.

plotbool, (default: True)

Show kernel density estimate plot or not.

threshfloat in [0, 1], (default: 0.02)

Lowest iso-proportion level at which to draw a contour line.

fillbool or None, (default: True)

If True, fill in the area under univariate density curves or between bivariate contours.

alphafloat or None, (default: 0.5)

Transparency of the rectangle and connector lines.

kwargs

Other keyword arguments are passed to seaborn.kdeplot.

Returns a plot and Integral of absolute density difference and Mutual Information between two clusterings.