scDesign3Py.scDesign3
- class scDesign3Py.scDesign3(n_cores: int = 1, parallelization: Literal['mcmapply', 'bpmapply', 'pbmcmapply'] = 'mcmapply', bpparam: rpy2.robjects.methods.RS4 | None = None, return_py: bool = True)[source]
Python interface for scDesign3
All functions are arranged in scDesign3 class for easy reuse generated results.
Attributes:
- sce:
SingleCellExperiment R object changed from the given Anndata object
- assay_use:
The name of the assay used for modeling
- all_covar:
All covariates (explainary variables) used to model gene expression pattern
- family_use:
The set marginal distribution of each gene.
- copula:
The copula type you set.
- n_cores:
The number of cores used for model fitting.
- parallelization:
The parallelization method.
- bpparam:
If @parallelization is ‘bpmapply’, the corresponding R object to set the parallelization parameters.
- return_py:
Whether the functions will return a result easy for manipulation.
- construct_data_res:
Result of calling @construct_data
- fit_marginal_res:
Result of calling @fit_marginal
- fit_copula_res:
Result of calling @fit_copula
- model_paras:
Result of calling @extract_para
- simu_res:
Result of calling @simu_new
- whole_pipeline_res:
Result of calling @scdesign3
Methods
__init__
([n_cores, parallelization, ...])Decide basic settings when running the class methods.
construct_data
(anndata, corr_formula[, ...])Construct the input data
extract_para
([data, new_covariate, ...])Extract the parameters of each cell's distribution
fit_copula
([input_data, copula, ...])Fit the copula model
fit_marginal
(mu_formula, sigma_formula, ...)Fit the marginal models
scdesign3
(anndata, corr_formula, mu_formula, ...)The wrapper for the whole scDesign3 pipeline
set_r_random_seed
(seed)Set the R random seed
simu_new
([mean_mat, sigma_mat, zero_mat, ...])Simulate new data