scDesign3Py.scDesign3.__init__

scDesign3.__init__(n_cores: int = 1, parallelization: Literal['mcmapply', 'bpmapply', 'pbmcmapply'] = 'mcmapply', bpparam: rpy2.robjects.methods.RS4 | None = None, return_py: bool = True) None[source]

Decide basic settings when running the class methods.

Details:

Decide basic settings including the parallel computation method, number cores to use and whether to return the more pythonic result.

Arguments:

n_cores: int (default: 1)

The number of cores to use.

parallelization: str (default: ‘mcmapply’)

The specific parallelization function to use. If ‘bpmapply’, first call method @get_bpparam.

bpparam: rpy2.robject.methods.RS4 (default: None)

If @parallelization is ‘bpmapply’, first call method @get_bpparam to get the robject. If @parallelization is ‘mcmapply’ or ‘pbmcmapply’, remain default None.

return_py: bool (default: True)

If @return_py is True, a rpy2.rlike.container.OrdDict object is returned, which can be manipulated basically like the dict object and has __getitem__(), get(), items() method. What’s more, values hosted in the object are transferred to pandas, numpy object. Else, a rpy2.robjects.ListVector object is returned, which also has the items() method, but if you want to get the value of a key, use rx2() method instead of __getitem__() and get() method. All values hosted basically remained as rpy2.robjects.vectors objects.

It is recommended that if there’s no need to manipulate the result, or if you are familiar with rpy2 package, set the @return_py as False, else setting @return_py as True may help you better manipulate the results. Default is True.