getStudyVariableInfo: Get meta-info of study variables

Description Usage Arguments Value Methods (by class) Examples

Description

The method returns the meta-info of variables under the study. It takes either a list of variable accessions or a dataset accession and returns the meta-info of the respective variables. When neither a list of variable accessions nor a dataset accession is provided, it returns the meta-info of all variable of the class study. When the data type is provided, only the variables of the respective data type are returned.

Usage

1
2
3
4
5
6
getStudyVariableInfo(object, ...)

## S4 method for signature 'Study'
getStudyVariableInfo(object, ..., phtAcc = "",
  phvAccList = vector(), dataType = "", dataStudyOnly = TRUE,
  showAs = "", editor = "")

Arguments

object

Study class object.

...

There are optional arguments.

phtAcc

a character string. The dbGaP dataset accession.

phvAccList

a character vector. The dbGaP phenotype variable accessions.

dataType

a character string. Specifies the data type of returned variables. The possible value is either 'num' (for numeric variable) or 'cat' (for categorical variable).

dataStudyOnly

a logical value. When TRUE (default), only downloads the dataset and variable metadata of the stdudies that have data files in the project directory. When FALSE, downloads the dataset and variable metadata of all dbGaP released studies, regardless the actual phenotype data files of the studies are downloaded or not.

showAs

a character string. (optional) When the value is 'table', displays the data as a table through a platform specific table viewer; When it is 'json', displays the json text through a plain text editor; When it is 'text', displays in a brief left-justified text format.

editor

a character string. (optional) The name of your favorite plain text editor. It should be executable from a command-line prompt of the respective platform. For example, notepad (Windows), vim, emacs (Unix), gedit (Ubuntu), nedit (CentOS), etc.

Value

a data frame. The meta-info of input variables.

Methods (by class)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 

s <- Study(phsAcc = 'phs000001.v3.p1')
getStudyVariableInfo(s)
# or
getStudyVariableInfo(s, phtAcc = 'pht000370.v2.p1')
or
getStudyVariableInfo(s, phtAcc = 'pht000370.v2.p1', dataType = 'num')
# or
accList = c('phv00054119.v1.p1.c2', 'phv00054118.v1.p1', 'phv00053733.v2')
getStudyVariableInfo(s, phvAccList = accList) 
# or
getStudyVariableInfo(s, phvAccList = accList, showAs = 'table')) 

## End(Not run)

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