makeVariantExperimentFromGDS: ShowAvailable

Description Usage Arguments Value Examples

View source: R/makeVariantExperimentFromGDS.R

Description

The function to show the available entries for the arguments within makeVariantExperimentFromGDS

Conversion of gds file into SummarizedExperiment.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
showAvailable(
  file,
  args = c("name", "rowDataColumns", "colDataColumns", "infoColumns")
)

makeVariantExperimentFromGDS(
  file,
  name = NULL,
  rowDataColumns = NULL,
  colDataColumns = NULL,
  infoColumns = NULL,
  rowDataOnDisk = TRUE,
  colDataOnDisk = TRUE
)

Arguments

file

the path to the gds.class file.

args

the arguments in makeVariantExperimentFromGDS.

name

the components of the gds file that will be represented as GDSArray file.

rowDataColumns

which columns of rowData to import. The default is NULL to read in all variant annotation info.

colDataColumns

which columns of colData to import. The default is NULL to read in all sample related annotation info.

infoColumns

which columns of infoColumns to import. The default is NULL to read in all info columns.

rowDataOnDisk

whether to save the rowData as DelayedArray object. The default is TRUE.

colDataOnDisk

whether to save the colData as DelayedArray object. The default is TRUE.

Value

An VariantExperiment object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## snp gds file
gds <- SNPRelate::snpgdsExampleFileName()
showAvailable(gds)

## sequencing gds file
gds <- SeqArray::seqExampleFileName("gds")
showAvailable(gds)

file <- SNPRelate::snpgdsExampleFileName()
## se <- makeVariantExperimentFromGDS(file)
## rowData(se)
## colData(se)
## metadata(se)
## Only read specific columns for feature annotation.
showAvailable(file)
## se1 <- makeVariantExperimentFromGDS(file, rowDataColumns=c("ALLELE"))
## SummarizedExperiment::rowRanges(se1)
file <- SeqArray::seqExampleFileName(type="gds")
## se <- makeVariantExperimentFromGDS(file)
## all assay data
## names(assays(se))
## showAvailable(file)

## only read specific columns for feature / sample annotation. 
names <- showAvailable(file, "name")$name
rowdatacols <- showAvailable(file, "rowDataColumns")$rowDataColumns
coldatacols <- showAvailable(file, "colDataColumns")$colDataColumns
infocols <- showAvailable(file, "infoColumns")$infoColumns
## se1 <- makeVariantExperimentFromGDS(
## file,
## name = names[2],
## rowDataColumns = rowdatacols[1:3],
## colDataColumns = coldatacols[1],
## infoColumns = infocols[c(1,3,5,7)],
## rowDataOnDisk = FALSE,
## colDataOnDisk = FALSE)
## assay(se1)

## the rowData(se1) and colData(se1) are now in DataFrame format 
## rowData(se1)
## colData(se1)

VariantExperiment documentation built on April 10, 2021, 6 p.m.