h_get_granges_by_id | R Documentation |
BioMart
Coordinates into GRanges
This function extracts the chromosome number, the start position and the end position of transcripts
in given data.frame
with coordinates as returned by biomaRt::getBM()
and converts
them to a GRanges
object.
h_get_granges_by_id(coords, id)
coords |
( |
id |
( |
GRange
objects for the respective single gene ID.
if (interactive()) {
mart <- biomaRt::useMart("ensembl", dataset = "hsapiens_gene_ensembl")
attrs <- c(
"ensembl_gene_id",
"ensembl_exon_id",
"chromosome_name",
"exon_chrom_start",
"exon_chrom_end"
)
coords <- biomaRt::getBM(
filters = "entrezgene_id",
attributes = attrs,
values = c("11185", "10677"),
mart = mart
)
h_get_granges_by_id(coords, "ENSG00000135407")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.