scOpen {SCArray} | R Documentation

## Open a Single-cell GDS File

### Description

Opens a single-cell GDS file.

### Usage

    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

    # 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)

[Package SCArray version 1.0.0 Index]