GDSFile-class: GDSFile constructor and methods.

Description Usage Arguments Value Examples

Description

GDSFile: GDSFile is a light-weight class to represent a GDS file. It has the '$' completion method to complete any possible gds nodes. If the slot of 'current_path' in 'GDSFile' object represent a valid gds node, it will return the 'GDSArray' of that node directly. Otherwise, it will return the 'GDSFile' object with an updated 'current_path'.

GDSFile: the GDSFile class constructor.

gdsfile: file slot getter for GDSFile object.

gdsfile<-: file slot setter for GDSFile object.

gdsnodes: to get the available gds nodes from the GDSFile object or the file path with extension of ".gds".

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
GDSFile(file, current_path = "")

## S4 method for signature 'GDSFile'
gdsfile(object)

## S4 replacement method for signature 'GDSFile'
gdsfile(object) <- value

## S4 method for signature 'GDSFile'
x$name

## S4 method for signature 'ANY'
gdsnodes(x)

Arguments

file

the GDS file path.

current_path

the current path to the closest gds node.

object

GDSFile object.

value

the new gds file path

x

a GDSFile object. or GDS file path (for gdsnodes()).

name

the name of gds node

Value

gdsfile: the file path of corresponding GDSfile object.

$: a GDSFile with updated @current_path, or GDSArray object if the current_path is a valid gds node.

gdsnodes: a character vector for the available gds nodes. When input is GDS file path, it returns all available gds nodes within the GDS file, no matter there is value or not. When input is GDSFile object, it returns only the gds nodes that could construct unique GDSArray objects, which means that the gds node has non-zero-dimensions, and is actually array, and all GDSArrays returned from these nodes are unique (by excluding the gds nodes that has 'code~ prefix).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
file <- SeqArray::seqExampleFileName("gds")
gf <- GDSFile(file)
gdsfile(gf)

file <- SNPRelate::snpgdsExampleFileName()
gdsnodes(file)
file1 <- SeqArray::seqExampleFileName("gds")
gdsnodes(file1)
gf <- GDSFile(file)
gdsnodes(gf)
gdsfile(gf)

GDSArray documentation built on April 2, 2021, 6 p.m.