scOpen: Open a Single-cell GDS File

Description Usage Arguments Value Author(s) See Also Examples

View source: R/scarray_main.r

Description

Opens a single-cell GDS file.

Usage

1
scOpen(gdsfn, readonly=TRUE, allow.duplicate=TRUE)

Arguments

gdsfn

the input file name

readonly

whether read-only or not

allow.duplicate

if TRUE, it is allowed to open a GDS file with read-only mode when it has been opened in the same R session

Value

Return an object of class SCArrayFileClass inherited from gds.class.

Author(s)

Xiuwen Zheng

See Also

scClose, scArray

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# a GDS file for SingleCellExperiment
fn <- system.file("extdata", "LaMannoBrainData.gds", package="SCArray")

# open the GDS file
(f <- scOpen(fn))

# read a GDS file
cell.id <- read.gdsn(index.gdsn(f, "feature.id"))
samp.id <- read.gdsn(index.gdsn(f, "sample.id"))

# get a DelayedArray object
(cnt <- scArray(f, "counts"))

scClose(f)

zhengxwen/SCArray documentation built on Jan. 1, 2021, 1:54 p.m.