Mercurial > repos > ethevenot > heatmap
annotate heatmap_wrapper.R @ 1:db1d80e89156 draft
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 29f9ccf5bd558becff5913528bb998aa7bb82d44
author | ethevenot |
---|---|
date | Sat, 06 Aug 2016 12:18:15 -0400 |
parents | ad06aeed02c9 |
children | b1667c118127 |
rev | line source |
---|---|
0
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
1 #!/usr/bin/env Rscript |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
2 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
3 library(batch) ## parseCommandArgs |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
4 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
5 source_local <- function(fname){ |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
6 argv <- commandArgs(trailingOnly = FALSE) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
7 base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
8 source(paste(base_dir, fname, sep="/")) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
9 } |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
10 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
11 source_local("heatmap_script.R") |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
12 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
13 argVc <- unlist(parseCommandArgs(evaluate=FALSE)) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
14 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
15 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
16 ##------------------------------ |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
17 ## Initializing |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
18 ##------------------------------ |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
19 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
20 ## options |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
21 ##-------- |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
22 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
23 strAsFacL <- options()[["stringsAsFactors"]] |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
24 options(stringsAsFactors=FALSE) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
25 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
26 ## constants |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
27 ##---------- |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
28 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
29 modNamC <- "Heatmap" ## module name |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
30 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
31 ## log file |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
32 ##--------- |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
33 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
34 sink(argVc["information"]) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
35 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
36 cat("\nStart of the '", modNamC, "' module: ", |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
37 format(Sys.time(), "%a %d %b %Y %X"), "\n", sep="") |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
38 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
39 ## loading |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
40 ##-------- |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
41 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
42 proMN <- t(as.matrix(read.table(argVc["dataMatrix_in"], |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
43 check.names = FALSE, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
44 header = TRUE, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
45 row.names = 1, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
46 sep = "\t"))) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
47 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
48 obsDF <- read.table(argVc["sampleMetadata_in"], |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
49 check.names = FALSE, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
50 header = TRUE, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
51 row.names = 1, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
52 sep = "\t") |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
53 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
54 feaDF <- read.table(argVc["variableMetadata_in"], |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
55 check.names = FALSE, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
56 header = TRUE, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
57 row.names = 1, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
58 sep = "\t") |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
59 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
60 ## adding default parameter values |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
61 ##-------------------------------- |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
62 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
63 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
64 if(!("corMetC" %in% names(argVc))) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
65 argVc["corMetC"] <- "pearson" |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
66 if(!("aggMetC" %in% names(argVc))) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
67 argVc["aggMetC"] <- "ward" |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
68 if(!("colC" %in% names(argVc))) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
69 argVc["colC"] <- "blueOrangeRed" |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
70 if(!("scaL" %in% names(argVc))) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
71 argVc["scaL"] <- "TRUE" |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
72 if(!("cexN" %in% names(argVc))) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
73 argVc["cexN"] <- "0.8" |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
74 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
75 ## checking |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
76 ##--------- |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
77 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
78 if(as.numeric(argVc["cutSamN"]) > nrow(proMN)) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
79 stop("Number of sample clusters must be inferior to the number of samples") |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
80 if(as.numeric(argVc["cutVarN"]) > ncol(proMN)) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
81 stop("Number of variable clusters must be inferior to the number of variables") |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
82 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
83 ## printing arguments |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
84 ##------------------- |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
85 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
86 cat("\nArguments used:\n\n") |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
87 argMC <- as.matrix(argVc) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
88 colnames(argMC) <- "value" |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
89 argDatVl <- grepl("\\.dat$", argVc) ## discarding dataset file names |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
90 if(sum(argDatVl)) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
91 argMC <- argMC[!argDatVl, , drop = FALSE] |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
92 print(argMC) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
93 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
94 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
95 ##------------------------------ |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
96 ## Computation |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
97 ##------------------------------ |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
98 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
99 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
100 heaLs <- heatmapF(proMN = proMN, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
101 obsDF = obsDF, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
102 feaDF = feaDF, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
103 disC = argVc["disC"], |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
104 cutSamN = as.numeric(argVc["cutSamN"]), |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
105 cutVarN = as.numeric(argVc["cutVarN"]), |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
106 fig.pdfC = argVc["figure"], |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
107 corMetC = argVc["corMetC"], |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
108 aggMetC = argVc["aggMetC"], |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
109 colC = argVc["colC"], |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
110 scaL = as.logical(argVc["scaL"]), |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
111 cexN = as.numeric(argVc["cexN"])) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
112 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
113 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
114 ##------------------------------ |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
115 ## Ending |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
116 ##------------------------------ |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
117 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
118 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
119 ## saving |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
120 ##------- |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
121 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
122 proDF <- cbind.data.frame(dataMatrix = colnames(heaLs[["proMN"]]), |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
123 as.data.frame(t(heaLs[["proMN"]]))) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
124 write.table(proDF, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
125 file = argVc["dataMatrix_out"], |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
126 quote = FALSE, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
127 row.names = FALSE, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
128 sep = "\t") |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
129 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
130 obsDF <- cbind.data.frame(sampleMetadata = rownames(heaLs[["obsDF"]]), |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
131 heaLs[["obsDF"]]) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
132 write.table(obsDF, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
133 file = argVc["sampleMetadata_out"], |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
134 quote = FALSE, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
135 row.names = FALSE, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
136 sep = "\t") |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
137 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
138 feaDF <- cbind.data.frame(variableMetadata = rownames(heaLs[["feaDF"]]), |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
139 heaLs[["feaDF"]]) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
140 write.table(feaDF, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
141 file = argVc["variableMetadata_out"], |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
142 quote = FALSE, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
143 row.names = FALSE, |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
144 sep = "\t") |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
145 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
146 ## Ending |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
147 ##------- |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
148 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
149 cat("\nEnd of the '", modNamC, "' Galaxy module call: ", |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
150 format(Sys.time(), "%a %d %b %Y %X"), "\n", sep = "") |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
151 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
152 sink() |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
153 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
154 options(stringsAsFactors = strAsFacL) |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
155 |
ad06aeed02c9
planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
ethevenot
parents:
diff
changeset
|
156 rm(list = ls()) |