getDatasetDataByPhtAcc: (internal) Get data by dataset accession

Description Usage Arguments Value Methods (by class) Examples

Description

The method returns the data of the given dataset. For large dataset, it may take quite a while to retrieve the data. The data of both subject and sample level variables can be returned through this method.

Usage

1
2
3
4
5
getDatasetDataByPhtAcc(object, phtAcc, ...)

## S4 method for signature 'Study,character'
getDatasetDataByPhtAcc(object, phtAcc, ...,
  dbgapIdsOrFile = NULL, colNameWithAcc = FALSE)

Arguments

object

Study class object.

phtAcc

a character string. The dbGaP phenotype dataset accession.

...

There are optional arguments.

dbgapIdsOrFile

a character vector or a character string. (optional) This argument can be either a vector of ID list or a path to a file that contains a list of IDs. The IDs can be dbGaP_Subject_ID or dbGaP_Sample_ID denpending on type of the data. When the list of IDs is provided by a file, it should be a plain text file with one ID per line.

colNameWithAcc

logical value. (optional). If TRUE, includes the variable accessions in the column names (e.g. AGEPHOT_phv00000027.v2); If FALSE, not include (e.g. AGEPHOT).

Value

a data frame. Data of the dataset.

Methods (by class)

Examples

1
2
3
4
5
6
7
8
## Not run: 

s <- Study(phsAcc = 'phs000001.v3.p1')
getDatasetDataByPhtAcc(s, phtAcc = 'pht000370.v2.p1')
# or
getDatasetDataByPhtAcc(s, phtAcc = 'pht000370.v2.p1', colNameWithAcc = TRUE)

## End(Not run)

jameslhao/dbgapr_dev documentation built on May 8, 2019, 11:03 p.m.