getStudyVariableInfoByTerms: Search variables by terms

Description Usage Arguments Value Methods (by class) Examples

Description

The method searches for variables related to given terms. It looks for text matches in the descriptions or the names of all variables or a specified set of variables within the class study. The search terms can be provided through three separate arguments of term-set that allow to either combine or narrow down the search results. The searches between the terms in each of the input term-set are in an 'OR' logic, which combines the search results of each term in the set. The resulting variables of the terms_1 search are used as the input of the terms_2 search, and the resulting variables of the terms_2 search are used as the input of the further term_3 search. The searches between the term-sets are in a 'AND' logic, which means that only the overlapping results are returned.

Usage

1
2
3
4
5
6
getStudyVariableInfoByTerms(object, terms_1, ...)

## S4 method for signature 'Study,character'
getStudyVariableInfoByTerms(object, terms_1, ...,
  terms_2 = vector(), terms_3 = vector(), searchIn = "description",
  showTable = FALSE, searchInPhvAccList = vector(), dataStudyOnly = TRUE)

Arguments

object

Study class object.

terms_1

a character vector. A list of terms used to search and find matching variables in the study. The search between the terms within the list is in a 'OR' logic. The search between this and terms_2 lists is in a 'AND' logic.

...

There are optional arguments.

terms_2

a character vector (optional) A list of search terms for the search against the variables resulting from the search of input terms_1. The terms in the list are searched in an 'OR' logic. The search between this and the term_1, as well as the terms_3 lists is in a 'AND' logic.

terms_3

a character vector (optional) A list of search terms against the variables resulting from the second round of search of input terms_2. The terms in the list are searched in an 'OR' logic. The search between this and terms_2 lists is in a 'AND' logic.

searchIn

a character string. (optional) A string with the possible value of either 'description' (default) or 'name'. If the value is 'description', the searches is against the variable descriptions. If the value is 'name', the search is against the variable names.

showTable

a logical value. (optional) If TRUE, displays the variable meta-info in a platform specific table viewer; Not display if FALSE (default).

searchInPhvAccList

a character vector. (optional) list of variable accessions. If not provided, the search will be against the variable descriptions of all variables of the study. If provided, the search will be against only the variables specified in list.

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 data frame. The meta-info of the variables that have the search terms in the variable name or description.

Methods (by class)

Examples

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

s <- Study(phsAcc = 'phs000001.v3.p1')
t1 = c('Diabetes Treatment', 'Smoking Status')
t2 = c('Year 10')
t3 = c('6 Months') 
df <- getStudyVariableInfoByTerms(s, terms_1=t1, terms_2=t2, terms_3=t3, showTable = T)

## End(Not run)

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