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.
Arguments
- coords
(
data.frame)
as returned bybiomaRt::getBM(), containing the columnsensembl_gene_id,chromosome_name,exon_chrom_start,exon_chrom_end.- id
(
string)
singleEnsemblgene ID to convert the coordinates for.
Examples
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")
}
