Hello,
I am writing a piece of code to retrieve some data using biomaRt from a given region. I have several regions in a list. I wonder if there is any way to get the initial "chromosomal_region" in the attributes. In the other words, I wanted to know each result is associated with what query.
Here is my command:
results=getBM(
attributes = c("hgnc_symbol","ensembl_gene_id", "chromosome_name", "start_position", "end_position","gene_biotype"),
filters = c("chromosomal_region"),
values = list(chromosomal_region=unlist(as.list(data$query))),
mart = ensemble)
and I want to have the chromosomal region in the output results.
If it's not present in the "attribute" list you cannot include it. But you can add it later with the function
findOverlaps
fromIRanges
Bioconductor package.