checkObjStudyByAcc: (internal) Get study of a dataset or variable

Description Usage Arguments Value Methods (by class) Examples

Description

The method checks a given dataset or variable accession to see if it belongs to the class study or not.

Usage

1
2
3
4
5
checkObjStudyByAcc(object, acc, ...)

## S4 method for signature 'Study,character'
checkObjStudyByAcc(object, acc, ...,
  dataStudyOnly = TRUE)

Arguments

object

Study class object.

acc

a character string. A dataset or variable accession.

...

There are optional arguments.

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.

Value

a character string. (invisible) The study accession to which the input dataset or variable belongs.

Methods (by class)

Examples

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

s <- Study(phsAcc = 'phs000001.v3.p1')
phsAcc <- checkObjStudyByAcc(s, acc = 'pht000370.v2.p1')
phsAcc <-checkObjStudyByAcc(s, acc = 'phv00054119.v1.p1')

## End(Not run)

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