Last active
July 20, 2017 21:42
-
-
Save thirdknife/700d867beba6c297d87d7e153b4435b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#necessary installations | |
source("http://bioconductor.org/biocLite.R") | |
biocLite("biomaRt") | |
library("biomaRt") | |
#use ensembl mart | |
ensembl = useMart("ensembl") | |
#reference homosapiens | |
ensembl = useDataset("hsapiens_gene_ensembl", ensembl) | |
#set gene to find | |
geneToFind = c("PolB") | |
#set attributes to list after search | |
attributes = c('hgnc_symbol', 'chromosome_name', 'start_position', 'end_position', 'band') | |
#set filter, in this case its gene name | |
filters = 'external_gene_name' | |
#call the getBM function to get result | |
getBM(attributes, filters, geneToFind, ensembl) | |
#output | |
# hgnc_symbol chromosome_name start_position end_position band | |
#1 POLB 8 42338454 42371808 p11.21 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment