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.

gdsfn: filename slot getter for GDSFile object.

gdsfn<-: 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'
gdsfn(object)

gdsfn(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

gdsfn: 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)
gdsfn(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")
gdsfn(gf)

Bioconductor/GDSArray documentation built on May 5, 2024, 9:32 a.m.