snpgdsOpen {SNPRelate} | R Documentation

## Open a SNP GDS File

### Description

Open a SNP GDS file

### Usage

    snpgdsOpen(filename, readonly=TRUE, allow.duplicate=FALSE, allow.fork=FALSE)

### Arguments

`filename` | the 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, see `openfn.gds`
`allow.fork` | `TRUE` for parallel environment using forking, see `openfn.gds`

### Details

It is strongly suggested to call `snpgdsOpen` instead of `openfn.gds`, since `snpgdsOpen` will perform internal checking for data integrality.

### Value

Return an object of class `SNPGDSFileClass`.

### Author(s)

Xiuwen Zheng

### See Also

`snpgdsClose`

### Examples

    # open an example dataset (HapMap)
    genofile <- snpgdsOpen(snpgdsExampleFileName())

    genofile

    # close the file
    snpgdsClose(genofile)

[Package SNPRelate version 1.20.1 Index]