extract_array {GDSArray} | R Documentation |
extract_array
: the function to extract data from
a GDS
file, by taking GDSArraySeed
as input. This
function is required by the DelayedArray
for the seed
contract.
GDSArray
: The function to convert a gds file
into the GDSArray data structure.
GDSArray
example data
## S4 method for signature 'GDSArraySeed' extract_array(x, index) GDSArray(gdsfile, varname) gdsExampleFileName(type = c("seqgds", "snpgds"))
x |
the GDSArraySeed object |
index |
An unnamed list of subscripts as positive integer
vectors, one vector per dimension in |
gdsfile |
Can be a GDSArraySeed, a character string of gds file name, or an "gds.class" R object. |
varname |
A character string specifying the gds array node to be read into GDSArray. |
type |
the type of gds file, available are "seqgds" for
|
GDSArray
class object.
fn <- gdsExampleFileName("snpgds") allnodes <- gdsnodes(fn) ## print all available gds nodes in fn. allnodes GDSArray(fn, "genotype") GDSArray(fn, "sample.annot/pop.group") fn1 <- gdsExampleFileName("seqgds") allnodes1 <- gdsnodes(fn1) ## print all available gds nodes in fn1. allnodes1 ## GDSArray(fn1, "genotype/data") GDSArray(fn1, "variant.id") GDSArray(fn1, "sample.annotation/family") GDSArray(fn1, "annotation/format/DP/data") GDSArray(fn1, "annotation/info/DP") gdsExampleFileName("snpgds") gdsExampleFileName("seqgds")