GRangesForUCSCGenome {rtracklayer} | R Documentation

## 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

[Package rtracklayer version 1.46.0 Index]