# Create from raw count matrices
ctrl.raw <- rawData(pbmc, "ctrl")
stim.raw <- rawData(pbmc, "stim")
pbmc1 <- createLiger(list(ctrl = ctrl.raw, stim = stim.raw))
# Create from H5 files
h5Path <- system.file("extdata/ctrl.h5", package = "rliger")
tempPath <- tempfile(fileext = ".h5")
file.copy(from = h5Path, to = tempPath)
lig <- createLiger(list(ctrl = tempPath))
# Create from other container object
if (requireNamespace("SeuratObject", quietly = TRUE)) {
ctrl.seu <- SeuratObject::CreateSeuratObject(ctrl.raw)
stim.seu <- SeuratObject::CreateSeuratObject(stim.raw)
pbmc2 <- createLiger(list(ctrl = ctrl.seu, stim = stim.seu))
}
Run the code above in your browser using DataLab