A string identifying a genome, usually one assigned by UCSC, like "hg19".
chrom
A character vector of chromosome names, or NULL.
ranges
A Ranges 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.