comparison histogram.r @ 0:0cebe436a553 draft default tip

Initial upload.
author hackdna
date Fri, 17 May 2013 14:29:33 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0cebe436a553
1 #!/usr/bin/env Rscript
2
3 #sink(file("/dev/null", "w"), type = "message");
4
5 library(pathprint);
6
7 # Figure out the relative path to the galaxy-pathprint.r library.
8 script.args <- commandArgs(trailingOnly = FALSE);
9 script.name <- sub("--file=", "", script.args[grep("--file=", script.args)])
10 script.base <- dirname(script.name)
11 library.path <- file.path(script.base, "galaxy-pathprint.r");
12 source(library.path)
13
14 usage <- function() {
15 stop("Usage: histogram.r <input> <output>", call. = FALSE)
16 }
17
18 ## Get the command line arguments.
19 args <- commandArgs(trailingOnly = TRUE)
20
21 input <- ifelse(! is.na(args[1]), args[1], usage())
22 output <- ifelse(! is.na(args[2]), args[2], usage())
23
24 distance <- loadDistance(input);
25 generateHistograms(distance, output);
26
27 quit("no", 0)