scmet_to_sce: Convert from scmet to SingleCellExperiment object.

View source: R/utils.R

scmet_to_sceR Documentation

Convert from scmet to SingleCellExperiment object.

Description

Helper function that converts an scmet to SCE object. The structure of the SCE object to store single cell methylation data is the following. We create two assays, met storing methylated CpGs and total storing total number of CpGs. Rows correspond to features and columns to cells, similar to scRNA-seq convention. The rownames and colnames slots should store the feature and cell names, respectively. Covariates X that might explain variability in mean (methylation) should be stored in ⁠metadata(rowData(sce)$X⁠.

Usage

scmet_to_sce(Y, X = NULL)

Arguments

Y

Methylation data in data.table format.

X

(Optional) Matrix of covariates.

Value

An SCE object with the structure described above.

Author(s)

C.A.Kapourani C.A.Kapourani@ed.ac.uk

See Also

scmet, scmet_differential, scmet_hvf_lvf

Examples

# Extract
sce <- scmet_to_sce(Y = scmet_dt$Y, X = scmet_dt$X)


andreaskapou/scMET documentation built on Feb. 1, 2024, 10:46 a.m.