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 theEntrezGeneIDprefix, orENSG00000241644forEnsemblgene ID.- id_var
(
string)
corresponding gene ID variable name inBioMart, i.e.entrezgene_idorensembl_gene_id.- mart
(
Mart)
givenbiomaRt::Martobject.
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)
}
