annotate scripts/common.R @ 0:ea8215239735 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
author iuc
date Sat, 03 Mar 2018 17:33:56 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
1 # Load libs
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
2 arr <- c("methods", "tsne","pheatmap","MASS","cluster","mclust","flexmix","lattice","fpc","RColorBrewer","permute","amap","locfit")
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
3 res <- lapply(arr, require, character.only = TRUE)
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
4
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
5
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
6 if (is.na(script_dir) || is.na(config_file) || script_dir == "None" || config_file == "None"){
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
7 stop("Could not find script_dir or config_file")
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
8 }
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
9
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
10 source(paste(script_dir, "RaceID_class.R", sep="/"))
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
11
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
12 # Load params
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
13 source(config_file)
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
14
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
15 # Common functions
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
16 message <- function(...){ print(sprintf(...)) }
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
17 plotter <- function(fname, funct){
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
18 name <- paste(fname, "svg", sep=".")
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
19 svg(name,width=10,height=10)
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
20 force(funct)
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
21 dev.off()
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
22 }
ea8215239735 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
iuc
parents:
diff changeset
23