GenomicFeatures (version 1.24.4)

makeTxDbFromUCSC: Make a TxDb object from annotations available at the UCSC Genome Browser

Description

The makeTxDbFromUCSC function allows the user to make a TxDb object from transcript annotations available at the UCSC Genome Browser.

Usage

makeTxDbFromUCSC( genome="hg19", tablename="knownGene", transcript_ids=NULL, circ_seqs=DEFAULT_CIRC_SEQS, url="http://genome.ucsc.edu/cgi-bin/", goldenPath_url="http://hgdownload.cse.ucsc.edu/goldenPath", taxonomyId=NA, miRBaseBuild=NA)
supportedUCSCtables(genome="hg19")
getChromInfoFromUCSC( genome, goldenPath_url="http://hgdownload.cse.ucsc.edu/goldenPath")

Arguments

genome
genome abbreviation used by UCSC and obtained by ucscGenomes()[ , "db"]. For example: "hg19".
tablename
name of the UCSC table containing the transcript annotations to retrieve. Use the supportedUCSCtables utility function to get the list of supported tables. Note that not all tables are available for all genome builds.
transcript_ids
optionally, only retrieve transcript annotation data for the specified set of transcript ids. If this is used, then the meta information displayed for the resulting TxDb object will say 'Full dataset: no'. Otherwise it will say 'Full dataset: yes'.
circ_seqs
a character vector to list out which chromosomes should be marked as circular.
url,goldenPath_url
use to specify the location of an alternate UCSC Genome Browser.
taxonomyId
By default this value is NA and the organism inferred will be used to look up the correct value for this. But you can use this argument to supply your own valid taxId here.
miRBaseBuild
specify the string for the appropriate build Information from mirbase.db to use for microRNAs. This can be learned by calling supportedMiRBaseBuildValues. By default, this value will be set to NA, which will inactivate the microRNAs accessor.

Value

A TxDb object for makeTxDbFromUCSC.A data frame with 1 row per chromosome (or scaffold) and with columns chrom and length for getChromInfoFromUCSC.

Details

makeTxDbFromUCSC is a convenience function that feeds data from the UCSC source to the lower level makeTxDb function. See ?makeTxDbFromBiomart for a similar function that feeds data from a BioMart database.

See Also

Examples

Run this code
## ---------------------------------------------------------------------
## A. BASIC USAGE
## ---------------------------------------------------------------------

## Use ucscGenomes() from the rtracklayer package to display the list of
## genomes available at UCSC:
library(rtracklayer)
ucscGenomes()[ , "db"]

## Display the list of tables supported by makeTxDbFromUCSC():
supportedUCSCtables()

## Retrieve a full transcript dataset for Yeast from UCSC:
txdb1 <- makeTxDbFromUCSC(genome="sacCer3", tablename="ensGene",
                          circ_seqs="chrM")
txdb1

## Retrieve an incomplete transcript dataset for Mouse from UCSC (only
## transcripts linked to Entrez Gene ID 22290):
transcript_ids <- c(
    "uc009uzf.1",
    "uc009uzg.1",
    "uc009uzh.1",
    "uc009uzi.1",
    "uc009uzj.1"
)

txdb2 <- makeTxDbFromUCSC(genome="mm10", tablename="knownGene",
                          transcript_ids=transcript_ids,
                          circ_seqs="chrM")
txdb2

## ---------------------------------------------------------------------
## B. RETRIEVING CHROMOSOME INFORMATION ONLY
## ---------------------------------------------------------------------

chrominfo <- getChromInfoFromUCSC(genome="hg38")
chrominfo

Run the code above in your browser using DataCamp Workspace