etrid2grl {Pbase} | R Documentation

## From a transcript identifier to `GRanges` object

### Description

This function takes on or more Ensembl transcript identifiers, queries Biomart and constructs a `GRangesList` object as would `Gviz::BiomartGeneRegionTrack` for a genomic region (in fact, currently most of the code has been taken from `Gviz::.fetchBMData` and `GViz::.chrName` is used to validate chromosome names).

### Usage

    etrid2grl(etrid, ens, use.names = FALSE)

### Arguments

`etrid` | A vector of Ensembl transcript identifiers.
`ens` | A instance of class `Mart` from biomaRt. If missing, `useMart("ensembl", "hsapiens_gene_ensembl")` is used.
`use.names` | If set to `TRUE` and `etrid` has names, then the latter are used to name the output.

### Value

A `GRangesList` object of length `length(etrid)`.

### Author(s)

Laurent Gatto

### Examples

    id <- c("ENST00000612959", "ENST00000317091")
    grl1 <- etrid2grl(id[1])
    grl1
    grl <- etrid2grl(id)
    stopifnot(all.equal(id, names(grl)))

[Package Pbase version 0.22.1 Index]