Created
April 3, 2014 17:48
-
-
Save kdaily/9959237 to your computer and use it in GitHub Desktop.
Get the chromosomal location and cytoband for list of HGNC gene symbols using biomaRt
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
# Code snippet to get chromosomal position and cytoband from gene symbols using | |
# biomaRt | |
# Kenneth Daily, 2014 | |
library(biomaRt) | |
ensembl <- useMart("ensembl", dataset = "hsapiens_gene_ensembl") | |
# Only use standard human chromosomes | |
normal.chroms <- c(1:22, "X", "Y", "M") | |
# Filter on HGNC symbol and chromosome, retrieve genomic location and band | |
my.symbols <- c("RB1", "TP53", "AKT3") | |
my.regions <- getBM(c("hgnc_symbol", "chromosome_name", "start_position", "end_position", "band"), | |
filters = c("hgnc_symbol", "chromosome_name"), | |
values = list(hgnc_symbol=my.symbols, chromosome_name=normal.chroms), | |
mart = ensembl) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment