createfn.gds: Create a GDS file

View source: R/gdsfmt-main.r

createfn.gdsR Documentation

Create a GDS file

Description

Create a new CoreArray Genomic Data Structure (GDS) file.

Usage

createfn.gds(filename, allow.duplicate=FALSE, use.abspath=TRUE)

Arguments

filename

the file name of a new GDS file to be created

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

use.abspath

if TRUE, 'filename' of the gds.class object is set to be the absolute path

Details

Keep in mind that the new file may not actually be written to disk until closefn.gds or sync.gds is called.

Value

Return an object of class gds.class:

filename

the file name to be created

id

internal file id

root

an object of class gdsn.class, the root of hierachical structure

readonly

whether it is read-only or not

Author(s)

Xiuwen Zheng

See Also

openfn.gds, closefn.gds

Examples

# cteate a GDS file
f <- createfn.gds("test.gds")

# add a list to "test.gds"
node <- add.gdsn(f, val=list(x=c(1,2), y=c("T", "B", "C"), z=TRUE))

f

# close the GDS file
closefn.gds(f)


# delete the temporary file
unlink("test.gds", force=TRUE)

zhengxwen/gdsfmt documentation built on Nov. 19, 2024, 1:03 p.m.