from_sce#
- @staticmethodSingleCell.from_sce(sce_object_name, *, assay='counts', num_threads=-1)[source]#
Create a SingleCell dataset from a SingleCellExperiment object that has already been loaded into memory via the ryp Python-R bridge. To load a SingleCellExperiment object from disk, use e.g. SingleCell(‘filename.rds’).
- Parameters:
sce_object_name: str
the name of the SingleCellExperiment object in the ryp R workspace
assay: str
the element within {sce_object_name}@assays@data to use as X. Defaults to ‘counts’. If available, set to ‘logcounts’ to load the normalized counts. If dense, will be automatically converted to a sparse array.
num_threads: int
the default number of threads to use for all subsequent operations on this SingleCell dataset. Also sets the number of threads for this SingleCell dataset’s count matrix, if present. Does not affect the number of threads used for data loading; this will always be single-threaded for SingleCellExperiment objects.
- Returns:
The corresponding SingleCell dataset.
- Return type: