annotate heatmap_wrapper.R @ 0:81ffd91ba495 draft default tip

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