This helper function queries BioMart
for lengths of genes by adding up all
exon lengths after reducing overlaps.
Arguments
- gene_ids
(
character
)
gene IDs, e.g.10329
, i.e. already without theEntrez
GeneID
prefix, orENSG00000241644
forEnsembl
gene ID.- id_var
(
string
)
corresponding gene ID variable name inBioMart
, i.e.entrezgene_id
orensembl_gene_id
.- mart
(
Mart
)
givenbiomaRt::Mart
object.
Examples
if (interactive()) {
mart <- biomaRt::useMart("ensembl", dataset = "hsapiens_gene_ensembl")
h_get_size_biomart("11185", "entrezgene_id", mart)
h_get_size_biomart("ENSG00000215417", "ensembl_gene_id", mart)
h_get_size_biomart(c("11185", "10677"), "entrezgene_id", mart)
h_get_size_biomart(c("ENSG00000135407", "ENSG00000215417"), "ensembl_gene_id", mart)
}