Mercurial > repos > ppericard > viscorvar
annotate circleCor_wrapper.R @ 1:e93350dc99f1 draft
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 1eda261d4fe137d6e8806b0c6af7eaf12d11ac95"
author | ppericard |
---|---|
date | Thu, 15 Oct 2020 12:22:25 +0000 |
parents | d0b77b926863 |
children |
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='Run the circleCor function') |
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('--blocks_vec', dest='blocks_vec', required=TRUE, help="Blocks vector") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
16 parser$add_argument('--responses_var', dest='responses_var', required=TRUE, help="Responses variables") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
17 parser$add_argument('--x_min', dest='x_min', type='double', required=TRUE, help="X min") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
18 parser$add_argument('--x_max', dest='x_max', type='double', required=TRUE, help="X max") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
19 parser$add_argument('--y_min', dest='y_min', type='double', required=TRUE, help="Y min") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
20 parser$add_argument('--y_max', dest='y_max', type='double', required=TRUE, help="Y max") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
21 parser$add_argument('--output_var', dest='output_var', required=TRUE, help="Output variables file") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
22 parser$add_argument('--output_pdf', dest='output_pdf', required=TRUE, help="Output PDF file") |
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 args <- parser$parse_args() |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
25 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
26 ## Print parameters |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
27 print("Input RData:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
28 print(args$input_rdata) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
29 print("Blocks vector:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
30 print(args$blocks_vec) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
31 print("Response variables:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
32 print(args$responses_var) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
33 print("X min:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
34 print(args$x_min) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
35 print("X max:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
36 print(args$x_max) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
37 print("Y min:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
38 print(args$y_min) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
39 print("Y max:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
40 print(args$y_max) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
41 print("Output variables file:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
42 print(args$output_var) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
43 print("Output PDF file:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
44 print(args$output_pdf) |
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 names_blocks = strsplit(args$blocks_vec, ",")[[1]] |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
47 names_response_variables = strsplit(args$responses_var, ",")[[1]] |
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 print("names_blocks:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
50 print(names_blocks) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
51 print("names_response_variables:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
52 print(names_response_variables) |
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 libraries |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
55 # suppressPackageStartupMessages(require(ellipse)) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
56 # suppressPackageStartupMessages(require(grDevices)) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
57 # suppressPackageStartupMessages(require(RColorBrewer)) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
58 # suppressPackageStartupMessages(require(mixOmics)) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
59 ## Loading local functions |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
60 # source_local("mixomics-blocksplsda-integration/integration_block_splsda_func.R") |
1
e93350dc99f1
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 1eda261d4fe137d6e8806b0c6af7eaf12d11ac95"
ppericard
parents:
0
diff
changeset
|
61 install.packages("https://gitlab.com/bilille/mixomics-blocksplsda-integration/-/raw/master/visCorVar_0.5.tar.gz", repos=NULL) |
0
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
62 suppressPackageStartupMessages(require(visCorVar)) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
63 print("visCorVar has been loaded") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
64 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
65 # R script call |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
66 source_local <- function(fname) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
67 { |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
68 argv <- commandArgs(trailingOnly = FALSE) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
69 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
|
70 source(paste(base_dir, fname, sep="/")) |
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 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
73 # Loading input Rdata file |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
74 # loads res_matCorAddVar object |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
75 load(args$input_rdata) |
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 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
|
78 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
|
79 cutoff_comp = res_matCorAddVar$cutoff_comp |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
80 comp = res_matCorAddVar$comp |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
81 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
|
82 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
|
83 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
|
84 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
|
85 res_block_splsda = res_matCorAddVar$res_block_splsda |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
86 |
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 print("mat_cor_comp1:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
89 print(mat_cor_comp1) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
90 print("mat_cor_comp2:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
91 print(mat_cor_comp2) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
92 print("cutoff_comp:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
93 print(cutoff_comp) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
94 print("comp:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
95 print(comp) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
96 print("list_vec_index_block_select:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
97 print(list_vec_index_block_select) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
98 print("list_vec_names_blocks:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
99 print(list_vec_names_blocks) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
100 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
|
101 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
|
102 print("res_compute_cor_var_interest:") |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
103 print(res_compute_cor_var_interest) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
104 |
1
e93350dc99f1
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 1eda261d4fe137d6e8806b0c6af7eaf12d11ac95"
ppericard
parents:
0
diff
changeset
|
105 # Open output pdf file |
0
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
106 pdf(args$output_pdf, width=8, height=7) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
107 mar = c(5, 5, 2, 8) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
108 par(mar = mar) |
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 selected_variables = circleCor(list_dataframe_cor_comp_var_global = 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
|
111 list_vec_index_block_select = list_vec_index_block_select, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
112 mat_cor_comp1 = mat_cor_comp1, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
113 mat_cor_comp2 = mat_cor_comp2, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
114 names_blocks = names_blocks, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
115 names_response_variables = names_response_variables, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
116 comp = comp, |
1
e93350dc99f1
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 1eda261d4fe137d6e8806b0c6af7eaf12d11ac95"
ppericard
parents:
0
diff
changeset
|
117 cutoff = 0.80, |
0
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
118 min.X = args$x_min, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
119 max.X = args$x_max, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
120 min.Y = args$y_min, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
121 max.Y = args$y_max, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
122 # vec_col = vec_col, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
123 rad.in = 0.5, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
124 cex = 0.7, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
125 cex_legend = 0.8, |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
126 pos = c(1.2, 0), |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
127 pch = 20) |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
128 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
129 dev.off() |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
130 |
d0b77b926863
"planemo upload for repository https://gitlab.com/bilille/galaxy-viscorvar commit 85dac6b13a9adce48b47b2b8cb28d2319ae9c1ca-dirty"
ppericard
parents:
diff
changeset
|
131 write(selected_variables, file=args$output_var, ncolumns=1) |