Using Biomartr To See What Is In A Region
I have a set of CNV regions and I want to know what genes/promoters/enhancers/etc are there. I am using Biomart under Bioconductor and in Biomart package in R, the example is like this,
human = useMart("ensembl", dataset = "hsapiens_gene_ensembl")
getLDS(attributes = c("hgnc_symbol","chromosome_name", "start_position"), filters = "hgnc_symbol", values = "TP53", mart = human, attributesL = c("chromosome_name","start_position"), martL = human)
However, I would like to do something vise verse, my input is like "chr1:100,100000" and I would like to get a list of annotation
• 4,002 views
•
link
1 answer
To get genes in a region, you probably want to use getBM() and the chromosomal_region filter. For example:
getBM(attributes = c("hgnc_symbol", "chromosome_name", "start_position"), filters = "chromosomal_region", values = "17:7500000:7600000", mart = human)
hgnc_symbol chromosome_name start_position
1 17 7514499
2 17 7588578
3 FXR2 17 7494548
4 17 7517264
5 SHBG 17 7517382
6 SAT2 17 7529552
7 ATP1B2 17 7549945
8 TP53 17 7565097
9 WRAP53 17 7589389
Use:
filters <- listFilters(human)
attributes <- listAttributes(human)
to see the available filters and attributes.
• 73 views
•
link
Log in to answer this question.
Edited your code; I think it should read:
Also - this code does not return "genes, promoters, enhancers etc." It returns this: