GDSFile-class: GDSFile constructor and methods.

GDSFile-classR Documentation

GDSFile constructor and methods.

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: filename slot getter for GDSFile object.

gdsfile<-: filename slot setter for GDSFile object.

gdsnodes: to get the available gds nodes from a gds file name or a GDSFile object.

Usage

GDSFile(file, current_path = "")

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

gdsfile(object) <- value

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

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

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 character string for the GDS file name or a GDSFile object.

name

the name of gds node

node

the node name of a gds file or GDSFile object.

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 of all available gds nodes within the related GDS file and the specified node.

Examples

fn <- gdsExampleFileName("seqgds")
gf <- GDSFile(fn)
gdsfile(gf)
fn <- gdsExampleFileName("seqgds")
gdsnodes(fn)
gdsnodes(fn, "annotation/info")
fn1 <- gdsExampleFileName("snpgds")
gdsnodes(fn1)
gdsnodes(fn1, "sample.annot")
gf <- GDSFile(fn)
gdsnodes(gf)
gdsnodes(gf, "genotype")
gdsfile(gf)

Bioconductor/GDSArray documentation built on Nov. 2, 2024, 9:57 p.m.