Skip to content
Snippets Groups Projects
Commit 2c101732 authored by Holger Brandl's avatar Holger Brandl
Browse files

added pathview species guesser

parent 521fb781
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,20 @@ guess_mart <- function(gene_id){
stop(paste("could not guess mart from ", an_id))
}
}
guess_pathview_species <- function(gene_id){
an_id <-gene_id[1]
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{
stop(paste("could not guess mart from ", an_id))
}
}
#guess_mart("ENSCAFG00000000043")
......
......@@ -149,7 +149,7 @@ makePcaPlot <- function(x = getData(), group = NA, items=rownames(x), title = ""
### Base-plot utils
plotPDF <- function(filename, expr){ pdf(paste0(filename, ".pdf")); expr; dev.off(); }
plotPDF <- function(fileBaseName, expr, ...){ pdf(paste0(fileBaseName, ".pdf"), ...); expr; dev.off(); }
#plotPDF("test", plot(1:10))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment