cleanObjAcc: (internal) Validate the format of dbGaP object

Description Usage Arguments Value Methods (by class) Examples

Description

The method checks the format of a dbGaP object accession, including the study, dataset, and variable accessions.

Usage

1
2
3
4
cleanObjAcc(object, acc, type)

## S4 method for signature 'Commons'
cleanObjAcc(object, acc, type)

Arguments

object

Commons class object.

acc

a character string. The accession of a dbGaP object (study, dataset, or variable object) with or without the p# (participant-set number). The accession returned from the function has the p# removed if it exists in the input string.

type

a character string. The dbGaP objec type. The possible values are 'phs' for study, 'pht' for dataset, and 'phv' for variable.

Value

a character string. The validated accession if the input is valid; An empty string if the input is invalid. The p# is removed from the returned accession if it exists in the input string.

Methods (by class)

Examples

1
2
3
4
5
6
## Not run: 

c <- Commons()
cleanObjAcc(c, acc = 'pht003718.v1.p1', type = 'pht')

## End(Not run)

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