Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

GRangesForUCSCGenome

GRanges for a Genome


Description

These functions assist in the creation of Seqinfo or GRanges for a genome.

Usage

GRangesForUCSCGenome(genome, chrom = NULL, ranges = NULL, ...)
GRangesForBSGenome(genome, chrom = NULL, ranges = NULL, ...)

SeqinfoForUCSCGenome(genome)
SeqinfoForBSGenome(genome)

Arguments

genome

A string identifying a genome, usually one assigned by UCSC, like "hg19".

chrom

A character vector of chromosome names, or NULL.

ranges

A IntegerRanges object with the intervals.

...

Additional arguments to pass to the GRanges constructor.

Details

The genome ID is stored in the metadata of the ranges and is retrievable via the genome function. The sequence lengths are also properly initialized for the genome. This mitigates the possibility of accidentally storing intervals for the wrong genome.

GRangesForUCSCGenome obtains sequence information from the UCSC website, while GRangesForBSGenome looks for it in an installed BSGenome package. Using the latter is more efficient in the long-run, but requires downloading and installing a potentially large genome package, or creating one from scratch if it does not yet exist for the genome of interest.

Value

For the GRangesFor* functions, a GRanges object, with the appropriate seqlengths and genome ID.

The SeqinfoFor* functions return a Seqinfo for the indicated genome.

Author(s)

Michael Lawrence


rtracklayer

R interface to genome annotation files and the UCSC genome browser

v1.50.0
Artistic-2.0 + file LICENSE
Authors
Michael Lawrence, Vince Carey, Robert Gentleman
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.