fetchRefSeqGene: Get RefSeq gene database

View source: R/REMPtools.R

fetchRefSeqGeneR Documentation

Get RefSeq gene database

Description

fetchRefSeqGene is used to obtain refSeq gene database provided by AnnotationHub (hg19) or UCSC web database (hg19/hg38).

Usage

fetchRefSeqGene(
  annotation.source = c("AH", "UCSC"),
  genome = c("hg19", "hg38"),
  mainOnly = FALSE,
  verbose = FALSE
)

Arguments

annotation.source

Character parameter. Specify the source of annotation databases, including the RefSeq Gene annotation database and RepeatMasker annotation database. If "AH", the database will be obtained from the AnnotationHub package. If "UCSC", the database will be downloaded from the UCSC website http://hgdownload.cse.ucsc.edu/goldenpath. The corresponding build ("hg19" or "hg38") will be specified in the parameter genome.

genome

Character parameter. Specify the build of human genome. Can be either "hg19" or "hg38". Note that if annotation.source == "AH", only hg19 database is available.

mainOnly

Logical parameter. See details.

verbose

Logical parameter. Should the function be verbose?

Details

When mainOnly = FALSE, only the transcript location information will be returned, Otherwise, a GRangesList object containing gene regions information will be added. Gene regions include: 2000 base pair upstream of the transcript start site ($tss)), 5'UTR ($fiveUTR)), coding sequence ($cds)), exon ($exon)), and 3'UTR ($threeUTR)). The index column is an internal index that is used to facilitate data referral, which is meaningless for external use.

Value

A single GRanges (for main refgene data) object or a list incorporating both GRanges object (for main refgene data) and GRangesList object (for gene regions data).

Examples

if (!exists("refgene.hg19")) 
refgene.hg19 <- fetchRefSeqGene(annotation.source = "AH", 
                                genome = "hg19", 
                                verbose = TRUE)
refgene.hg19


YinanZheng/REMP documentation built on May 14, 2022, 5:58 p.m.