GDSArray-classes: GDSArray constructor and coercion methods.

Description Usage Arguments Value Examples

Description

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

Usage

1
2
3
4
5
6
## S4 method for signature 'GDSArraySeed'
extract_array(x, index)

GDSArray(file, name = NA)

example(pkg = "GDSArray")

Arguments

x

the GDSArraySeed object

index

An unnamed list of subscripts as positive integer vectors, one vector per dimension in x. Empty and missing subscripts (represented by integer(0) and NULL list elements, respectively) are allowed. The subscripts can contain duplicated indices. They cannot contain NAs or non-positive values.

file

the gds file name.

name

the gds array node to be read into GDSArraySeed / GDSArray. For GDSArray, the default value for name is the genotype data.

pkg

the package name, which is "GDSArray" by default.

Value

GDSArray class object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
file <- SNPRelate::snpgdsExampleFileName()
allnodes <- gdsnodes(file)  ## print all available gds nodes in file.
allnodes
## GDSArray(file) #> deactivate temporarily 3/4/20
GDSArray(file, "sample.annot/pop.group")

file1 <- SeqArray::seqExampleFileName("gds")
allnodes1 <- gdsnodes(file1)  ## print all available gds nodes in file1. 
allnodes1
## GDSArray(file1) #> deactivate temporarily 3/4/20
GDSArray(file1, "variant.id")
GDSArray(file1, "sample.annotation/family")
GDSArray(file1, "annotation/format/DP")
GDSArray(file1, "annotation/info/DP")
example("GDSArray")

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