parsePhenoFileMeta: (internal) Parse dataset file info

Description Usage Arguments Value Methods (by class) Examples

Description

The method parses the meta-info from pthe henotype dataset file name and headers, and saves the file associated attributes to a json file. It is called from writeFileInfoJson.

Usage

1
2
3
4
5
parsePhenoFileMeta(object, dbgapFile, ...)

## S4 method for signature 'Commons,character'
parsePhenoFileMeta(object, dbgapFile, ...,
  parseHeader = FALSE)

Arguments

object

Commons class object.

dbgapFile

a variable string. The path to a dbGaP phenotype file or a file name of the phenotype file.

...

There are optional arguments.

parseHeader

a logical value. (optional) If TRUE, opens the file and parses out the info from the file header; If FALSE (default), only the file name is parsed. Note: Always leave it as default FALSE, since parsing data file header takes too long, and parsed header info is not used for anything in this package.

Value

Returns a character list. The phenotype file attributes, such as fStAcc (file study accession), fPhtAcc (file phenotype accession) etc.

Methods (by class)

Examples

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

c <- Commons() 
phtFile = '/home/foo/data/phs000001.AREDS.pht000001.v1.p1.c1.Eye_Disease_Only.txt.gz' 
parsePhenoFileMeta(c, dbgapFile = phtFile) 

## End(Not run)

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