getAvailPhtVer: (internal) Get available dataset accession by variable...

Description Usage Arguments Value Methods (by class) Examples

Description

When querying study_variable_info table with a variable accession, multiple dataset versions could be returned. This methods further queris the study_dataset table given any of the dataset accessions from the early query, and returns the correct dataset accession that matches the given study accession.

Usage

1
2
3
4
5
getAvailPhtVer(object, randPhtAcc, ...)

## S4 method for signature 'Commons,character'
getAvailPhtVer(object, randPhtAcc, ...,
  phsAcc = NA, studyPhtInfoDF = data.frame(), dataStudyOnly = TRUE)

Arguments

object

Commons class object.

randPhtAcc

a character string. One of the randomly chosen dataset accessions returned from queyring study_variable_info table by a variable accession.

...

There are optional arguments.

phsAcc

a character string. A study accession. It is required when studyPhtInfoDF is not provided.

studyPhtInfoDF

a data frame. The dataset info table of the study.

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. The dataset accession that have a match with available studies.

Methods (by class)

Examples

1
2
3
4
5
6
## Not run: 

c <- Commons()
getAvailPhtVer(c, randPhtAcc='pht000009.v1', phsAcc='phs000007.v29')

## End(Not run)

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