comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:ea8215239735
1 # Load libs
2 arr <- c("methods", "tsne","pheatmap","MASS","cluster","mclust","flexmix","lattice","fpc","RColorBrewer","permute","amap","locfit")
3 res <- lapply(arr, require, character.only = TRUE)
4
5
6 if (is.na(script_dir) || is.na(config_file) || script_dir == "None" || config_file == "None"){
7 stop("Could not find script_dir or config_file")
8 }
9
10 source(paste(script_dir, "RaceID_class.R", sep="/"))
11
12 # Load params
13 source(config_file)
14
15 # Common functions
16 message <- function(...){ print(sprintf(...)) }
17 plotter <- function(fname, funct){
18 name <- paste(fname, "svg", sep=".")
19 svg(name,width=10,height=10)
20 force(funct)
21 dev.off()
22 }
23