extract_array {GDSArray}R Documentation

GDSArray constructor and coercion methods.

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

## 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

file <- SNPRelate::snpgdsExampleFileName()
allnodes <- gdsnodes(file)  ## print all available gds nodes in file.
allnodes
GDSArray(file)
GDSArray(file, "sample.annot/pop.group")

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


[Package GDSArray version 1.2.0 Index]