createfn.gds: Create a GDS file

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/gdsfmt-main.r

Description

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

Usage

1
createfn.gds(filename, allow.duplicate=FALSE)

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

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

References

http://github.com/zhengxwen/gdsfmt

See Also

openfn.gds, closefn.gds

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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)

Example output

File: /work/tmp/test.gds
+ 	[  ]
|--+ Item1	[ list ] *
|  |--+ x	{ Float64 2 }
|  |--+ y	{ VStr8 3 }
|  |--+ z	{ Int32,logical 1 } *

gdsfmt documentation built on Dec. 26, 2020, 6 p.m.