Last active
August 29, 2015 14:11
Revisions
-
davebridges revised this gist
Dec 17, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ dataset <- read.csv('Hits_PvsM_HighinMimic_filt.csv') #you have several different ensembl results unique(substr(dataset$Gene, 1,7)) #get a mapping file to get externam gene names from stickleback stickleback_table <- getBM(attributes=c('ensembl_gene_id','external_gene_name','entrezgene'), filters='ensembl_gene_id', values=dataset$Gene, -
davebridges created this gist
Dec 17, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ library(biomaRt) ensembl=useMart("ensembl") #show possible datasets listDatasets(ensembl) #your results are listed here dataset <- read.csv('Hits_PvsM_HighinMimic_filt.csv') #you have several different ensembl results unique(substr(dataset$Gene, 1,7)) #get a mapping file to convert stickleback to Danio rerio stickleback_table <- getBM(attributes=c('ensembl_gene_id','external_gene_name','entrezgene'), filters='ensembl_gene_id', values=dataset$Gene, mart=useDataset("gaculeatus_gene_ensembl",mart=ensembl)) #repeat this with other species in your results set by changing the species in the use dataset. #To find the abbreviation for that species use listDatasets(ensembl) mapped_table <- rbind(stickleback_table) #add other tables write.csv(mapped_table, file="Mapped Genes.csv")