Mercurial > repos > ppericard > viscorvar
annotate matCorAddVar_wrapper.R @ 0:d0b77b926863 draft
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
author | ppericard |
---|---|
date | Tue, 23 Jun 2020 19:57:35 -0400 |
parents | |
children | e93350dc99f1 |
rev | line source |
---|---|
0
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
1 #!/usr/bin/env Rscript |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
2 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
3 # Setup R error handling to go to stderr |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
4 options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } ) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
5 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
6 # we need that to not crash galaxy with an UTF8 error on German LC settings. |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
7 loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
8 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
9 ## Get parameters ## |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
10 suppressPackageStartupMessages(require(argparse)) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
11 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
12 parser <- ArgumentParser(description='Compute the matCorEtBlockSelect and addVariablesReponses functions') |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
13 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
14 parser$add_argument('--input_rdata', dest='input_rdata', required=TRUE, help="Input RData file") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
15 parser$add_argument('--cutoff_comp', dest='cutoff_comp', type='double', required=TRUE, help="") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
16 parser$add_argument('--interest_var_file', dest='interest_var_file', required=FALSE, help="Variables of interest file") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
17 parser$add_argument('--block_Y_file', dest='block_Y_file', required=TRUE, help="Block Y filepath") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
18 parser$add_argument('--output_rdata', dest='output_rdata', required=TRUE, help="Output RData file") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
19 parser$add_argument('--output_response_var', dest='output_response_var', required=TRUE, help="Output response variables file") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
20 parser$add_argument('--output_blocks_comb', dest='output_blocks_comb', required=TRUE, help="Output blocks combinations file") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
21 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
22 args <- parser$parse_args() |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
23 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
24 ## Print parameters |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
25 print("Input RData:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
26 print(args$input_rdata) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
27 print("Cutoff comp:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
28 print(args$cutoff_comp) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
29 print("Variables of interest:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
30 print(args$interest_var_file) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
31 print("Block Y file:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
32 print(args$block_Y_file) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
33 print("Output RData:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
34 print(args$output_rdata) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
35 print("Output Response variables:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
36 print(args$output_response_var) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
37 print("Output Blocks combinations:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
38 print(args$output_blocks_comb) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
39 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
40 ## Loading libraries |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
41 # source_local("mixomics-blocksplsda-integration/integration_block_splsda_func.R") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
42 install.packages("https://gitlab.com/bilille/mixomics-blocksplsda-integration/-/raw/master/visCorVar_0.3.tar.gz", repos=NULL) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
43 suppressPackageStartupMessages(require(visCorVar)) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
44 print("visCorVar has been loaded") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
45 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
46 # R script call |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
47 source_local <- function(fname) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
48 { |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
49 argv <- commandArgs(trailingOnly = FALSE) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
50 base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
51 source(paste(base_dir, fname, sep="/")) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
52 } |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
53 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
54 # Loading input Rdata file |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
55 load(args$input_rdata) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
56 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
57 ncomp = mixomics_result$ncomp |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
58 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
59 # Reading Block Y matrix |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
60 print("Reading Block Y") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
61 mat_block_Y = read.table(args$block_Y_file, header=TRUE, row.names=1) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
62 print(mat_block_Y) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
63 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
64 response_var = colnames(mat_block_Y) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
65 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
66 print("response_var:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
67 print(response_var) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
68 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
69 # Write response variables to output file |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
70 invisible(lapply(response_var, write, file=args$output_response_var, append=TRUE, ncolumns=1)) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
71 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
72 # Reading var of intereset file |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
73 interest_var_vec = NULL |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
74 if (args$interest_var_file != 'None') { |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
75 interest_var_vec = as.character(read.table(args$interest_var_file, header=FALSE)[[1]]) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
76 } |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
77 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
78 # |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
79 comp = 1:2 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
80 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
81 # Running main function |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
82 res_matCorAddVar = matCorAddVar(res_block_splsda = mixomics_result, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
83 block_Y = mat_block_Y, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
84 cutoff_comp = args$cutoff_comp, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
85 var_interest = interest_var_vec, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
86 comp = comp) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
87 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
88 # |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
89 mat_cor_comp1 = res_matCorAddVar$mat_cor_comp1 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
90 mat_cor_comp2 = res_matCorAddVar$mat_cor_comp2 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
91 list_vec_index_block_select = res_matCorAddVar$list_vec_index_block_select |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
92 list_vec_names_blocks = res_matCorAddVar$list_vec_names_blocks |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
93 list_cor_comp_selected_var_resp_var = res_matCorAddVar$list_cor_comp_selected_var_resp_var |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
94 res_compute_cor_var_interest = res_matCorAddVar$res_compute_cor_var_interest |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
95 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
96 # |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
97 print("mat_cor_comp1:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
98 print(mat_cor_comp1) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
99 print("mat_cor_comp2:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
100 print(mat_cor_comp2) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
101 print("list_vec_index_block_select:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
102 print(list_vec_index_block_select) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
103 print("list_vec_names_blocks:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
104 print(list_vec_names_blocks) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
105 print("list_cor_comp_selected_var_resp_var:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
106 print(list_cor_comp_selected_var_resp_var) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
107 print("res_compute_cor_var_interest:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
108 print(res_compute_cor_var_interest) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
109 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
110 # Write all possible blocks combinations to output file |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
111 invisible(lapply(list_vec_names_blocks, write, file=args$output_blocks_comb, append=TRUE, ncolumns=100, sep=",")) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
112 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
113 # Save all objects in Rdata output file |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
114 save(res_matCorAddVar, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
115 file = args$output_rdata) |