etrid2grl: From a transcript identifier to 'GRanges' object

Description Usage Arguments Value Author(s) Examples

View source: R/GRanges.R

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

1
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

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

Pbase documentation built on Oct. 31, 2019, 2:20 a.m.