getUCSCTable: Load an annotation table from the UCSC Genome Browser as an R...

Description Usage Arguments Value

View source: R/ucsc.r

Description

If only table and genome are given, the function will load the data directly into the R workspace. If cachedir is a path to a directory, this directory will be used to maintain a cache of UCSC tables so they do not need to be re-downloaded on each call. If the data already exists and sync=TRUE, the function will only re-download and re-extract if the modified dates are different between the cachedir and remote copies. Note that start coordinates in these raw data tables are 0-based, whereas the Goldmine annotation functions will convert these to be 1-based.

Usage

1
2
3
getUCSCTable(table, genome, cachedir = NULL, version = "latest",
  sync = TRUE, url = "http://hgdownload.cse.ucsc.edu/goldenPath/",
  fread = TRUE)

Arguments

table

The UCSC string specific for the table to sync (e.g. "knownGene", "kgXref", etc)

genome

The UCSC string specific to the genome to be downloaded (e.g. "hg19", "hg19", "mm10", etc)

cachedir

A path to a directory where a cachedir cache of UCSC tables are stored. If equal to NULL (default), the data will be downloaded to temporary files and loaded on the fly.

version

If "latest" (default) then use the newest version of the table available. If set to a timestamp string of an archived table (format: YYYY-MM-DD-HH-MM-SS), then load this specific version. Obtain these strings by examining the file names under your cache directory. An archive file with a date stamp is saved automatically with each download of a new version. This feature only works if you have a cachedir cache that contains the desired versions.

sync

If TRUE, then check if a newer version is available and download if it is. If FALSE, skip this check. Only has an effect if a cachedir cache directory (cachedir) is given.

url

The root of the remote http URL to download UCSC data from (set by default to http://hgdownload.cse.ucsc.edu/goldenPath/)

Value

A data.frame or data.table of the desired UCSC table.


jeffbhasin/goldmine documentation built on Nov. 13, 2019, 9:11 a.m.