getVariableDataByPhvAccAndSubjId: (internal) Get variable data subset by subject ids

Description Usage Arguments Value Methods (by class) Examples

Description

The method returns the data of a given list of variables subset by a list of subject ids.

Usage

1
2
3
4
5
getVariableDataByPhvAccAndSubjId(object, phvAccList, ...)

## S4 method for signature 'Study,character'
getVariableDataByPhvAccAndSubjId(object, phvAccList,
  ..., dbgapIdsOrFile = NULL)

Arguments

object

Study class object

phvAccList

a character vector. A list of dbGaP variable accessions.

...

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.

Value

a data frame. The variable data of given variables subset by the given subjects.

Methods (by class)

Examples

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

s <- Study(phsAcc = 'phs000001.v3.p1')
ids <- c("219", "220", "221") 
accList <- c('phv00054119.v1.p1.c2', 'phv00053735.v2')
getVariableDataByPhvAccAndSubjId(s, phvAccList = accList, dbgapIdsOrFile = ids)
idFile = '/home/user/temp/subj_ids.txt'
getVariableDataByPhvAccAndSubjId(s, phvAccList = accList, dbgapIdsOrFile = idFile)

## End(Not run)

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