multivelovae.differential_dynamics

multivelovae.differential_dynamics(adata, adata_atac, model, group1=None, group2=None, group_key=None, idx1=None, idx2=None, batch_key=None, batch_correction=True, weight_batch_uniform=False, mode='vanilla', signed_velocity=True, test_decoupling=False, save_raw=False, n_samples=5000, norm=0.1, delta=1, fdr=0.05, seed=0)

Calculate differential dynamics between two groups of cells.

Args:
adata (anndata.AnnData):

RNA AnnData object.

adata_atac (anndata.AnnData):

ATAC AnnData object.

model (velovae.VAEChrom):

A trained MultiVeloVAE model.

group1 (str, optional):

Name of group 1 in adata.obs[group_key]. Defaults to None.

group2 (str, optional):

Name of group 2 in adata.obs[group_key]. Defaults to None.

group_key (str, optional):

Field in adata.obs to find group labels. Defaults to None.

idx1 ([list, numpy.ndarray], optional):

Indices of cells in group 1. Defaults to None.

idx2 ([list, numpy.ndarray], optional):

Indices of cells in group 2. Defaults to None.

batch_key (str, optional):

Field in adata.obs to find batch labels. Defaults to None.

batch_correction (bool, optional):

Whether to perform batch correction before group comparisons. Defaults to True.

weight_batch_uniform (bool, optional):

Whether to draw cells equally or based on cell counts in each batch. Defaults to False.

mode (str, optional):

vanilla mode is one-sided and change mode is two-sided. change mode uses delta to specify null hypothesis and computes a P-value. Defaults to ‘vanilla’.

signed_velocity (bool, optional):

Whether to use original velocity values or absolute values. Defaults to True.

test_decoupling (bool, optional):

Whether to test decoupling and coupling dynamics. Defaults to False.

save_raw (bool, optional):

Whether to save the predicted data in adata. Defaults to False.

n_samples (int, optional):

Number of data points in each group to generate. Defaults to 5000.

norm (Float, optional):

Normalization factor for log2 difference. Defaults to 0.1.

delta (Float, optional):

Interval of change used to define null hypothesis. Defaults to 1.

fdr (Float, optional):

False Discovery Rate threshold. Defaults to 0.05.

seed (int, optional):

Seed for random generator. Defaults to 0.

Returns:

pandas.DataFrame: Output DataFrame with differential dynamics on various variables.