Commit 8c3cb2a1 authored by Holger Brandl's avatar Holger Brandl

removed cp util duplicates

parent cb22ab37
......@@ -69,24 +69,6 @@ get_ensembl_build <- function(){
biomaRt::listMarts() %>% as.data.frame() %>% filter(biomart=="ensembl") %>% with(str_match(version, " ([0-9]*) ")) %>% subset(select=2)
}
guess_pathview_species <- function(gene_id){
an_id <-gene_id[1]
## see http://www.genome.jp/kegg-bin/find_org_www?mode=abbr&obj=mode.map
if(str_detect(an_id, "ENSMUSG")){
return("mmu")
}else if(str_detect(an_id, "ENSDARG")){
return("dre")
}else if(str_detect(an_id, "ENSG")){
return("hsa")
}else if(str_detect(an_id, "FBgn")){
return("dme")
}else{
stop(paste("could not guess mart from ", an_id))
}
}
#guess_mart("ENSCAFG00000000043")
getGeneInfo <- function(gene_ids){
martName <- guess_mart(gene_ids[1])
......@@ -264,39 +246,4 @@ davidAnnotationChart <- function( someGenes, ontologies=DEF_DAVID_ONTOLOGIES ){
# if(nrow(annoChart) >0) annoChart <- annoChart %>% dplyr::select(select=-Genes)
return(annoChart)
}
## todo move to diffex commons
guess_cp_species <- function(ensIds){
an_id <-ensIds[1]
if(str_detect(an_id, "ENSG")){
return("human")
}else if(str_detect(an_id, "ENSMUSG")){
return("mouse")
}else if(str_detect(an_id, "ENSDARG")){
return("zebrafish")
}else if(str_detect(an_id, "FBgn")){
return("fly")
}else{
stop(paste("could not clusterProfiler species name from ", an_id))
}
}
guess_anno_db <- function(ensIds){
an_id <-ensIds[1]
if(str_detect(an_id, "ENSG")){
return("org.Hs.eg.db")
}else if(str_detect(an_id, "ENSMUSG")){
return("org.Mm.eg.db")
}else if(str_detect(an_id, "ENSDARG")){
return("org.Dr.eg.db")
}else if(str_detect(an_id, "FBgn")){
return("org.Dm.eg.db")
}else{
stop(paste("could not anno db mart from ", an_id))
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment