# HG changeset patch
# User eschen42
# Date 1648261632 0
# Node ID 2c5f1a2fe16a8d9452591520f8aee33de78a8a6d
# Parent 6679616d0c18408057baf06e78661daa2b3b7690
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/mqppep commit 96659062ea07ac43d139746b0d119f1ee020f9cd"
diff -r 6679616d0c18 -r 2c5f1a2fe16a macros.xml
--- a/macros.xml Tue Mar 22 23:12:18 2022 +0000
+++ b/macros.xml Sat Mar 26 02:27:12 2022 +0000
@@ -1,5 +1,5 @@
- 0.1.5
+ 0.1.6
0
@@ -16,15 +16,18 @@
r-optparse
r-rmarkdown
r-tinytex
r-ggplot2
python
perl
+ r-latex2exp
+ r-vioplot
diff -r 6679616d0c18 -r 2c5f1a2fe16a mqppep_anova.R
--- a/mqppep_anova.R Tue Mar 22 23:12:18 2022 +0000
+++ b/mqppep_anova.R Sat Mar 26 02:27:12 2022 +0000
@@ -32,7 +32,7 @@
make_option(
c("-f", "--firstDataColumn"),
action = "store",
- default = "10",
+ default = "^Intensity[^_]",
type = "character",
help = "First column of intensity values"
),
@@ -110,9 +110,12 @@
if (! file.exists(args$inputFile)) {
stop((paste("Input file", args$inputFile, "does not exist")))
}
-input_file <- args$inputFile
-alpha_file <- args$alphaFile
-first_data_column <- args$firstDataColumn
+input_file <- args$inputFile
+alpha_file <- args$alphaFile
+imputed_data_file_name <- args$imputedDataFile
+imp_qn_lt_data_filenm <- args$imputedQNLTDataFile
+report_file_name <- args$reportFile
+
imputation_method <- args$imputationMethod
print(
grepl(
@@ -133,42 +136,49 @@
return(-1)
}
+# read with default values, when applicable
mean_percentile <- args$meanPercentile
-print("mean_percentile is:")
-cat(str(mean_percentile))
-
-sd_percentile <- args$sdPercentile
-print("sd_percentile is:")
-cat(str(mean_percentile))
-
+sd_percentile <- args$sdPercentile
+# in the case of 'random" these values are ignored by the client script
+if (imputation_method == "random") {
+ print("mean_percentile is:")
+ cat(str(mean_percentile))
-regex_sample_names <- gsub("^[ \t\n]*", "",
- readChar(args$regexSampleNames, 1000)
- )
-regex_sample_names <- gsub("[ \t\n]*$", "",
- regex_sample_names
- )
-cat(regex_sample_names)
-cat("\n")
+ print("sd_percentile is:")
+ cat(str(mean_percentile))
+}
-regex_sample_grouping <- gsub("^[ \t\n]*", "",
- readChar(args$regexSampleGrouping, 1000)
- )
-regex_sample_grouping <- gsub("[ \t\n]*$", "",
- regex_sample_grouping
- )
-cat(regex_sample_grouping)
-cat("\n")
-
-imputed_data_file_name <- args$imputedDataFile
-imp_qn_lt_data_filenm <- args$imputedQNLTDataFile
-report_file_name <- args$reportFile
-
-print("regex_sample_names is:")
-cat(str(regex_sample_names))
-
-print("regex_sample_grouping is:")
-cat(str(regex_sample_grouping))
+# convert string parameters that are passed in via config files:
+# - firstDataColumn
+# - regexSampleNames
+# - regexSampleGrouping
+read_config_file_string <- function(fname, limit) {
+ # eliminate any leading whitespace
+ result <- gsub("^[ \t\n]*", "", readChar(fname, limit))
+ # eliminate any trailing whitespace
+ result <- gsub("[ \t\n]*$", "", result)
+ # substitute characters escaped by Galaxy sanitizer
+ result <- gsub("__lt__", "<", result)
+ result <- gsub("__le__", "<=", result)
+ result <- gsub("__eq__", "==", result)
+ result <- gsub("__ne__", "!=", result)
+ result <- gsub("__gt__", ">", result)
+ result <- gsub("__ge__", ">=", result)
+ result <- gsub("__sq__", "'", result)
+ result <- gsub("__dq__", '"', result)
+ result <- gsub("__ob__", "[", result)
+ result <- gsub("__cb__", "]", result)
+}
+cat(paste0("first_data_column file: ", args$firstDataColumn, "\n"))
+cat(paste0("regex_sample_names file: ", args$regexSampleNames, "\n"))
+cat(paste0("regex_sample_grouping file: ", args$regexSampleGrouping, "\n"))
+nc <- 1000
+regex_sample_names <- read_config_file_string(args$regexSampleNames, nc)
+regex_sample_grouping <- read_config_file_string(args$regexSampleGrouping, nc)
+first_data_column <- read_config_file_string(args$firstDataColumn, nc)
+cat(paste0("first_data_column: ", first_data_column, "\n"))
+cat(paste0("regex_sample_names: ", regex_sample_names, "\n"))
+cat(paste0("regex_sample_grouping: ", regex_sample_grouping, "\n"))
# from: https://github.com/molgenis/molgenis-pipelines/wiki/
# How-to-source-another_file.R-from-within-your-R-script
diff -r 6679616d0c18 -r 2c5f1a2fe16a mqppep_anova.xml
--- a/mqppep_anova.xml Tue Mar 22 23:12:18 2022 +0000
+++ b/mqppep_anova.xml Sat Mar 26 02:27:12 2022 +0000
@@ -22,7 +22,7 @@
\${CONDA_PREFIX}/bin/Rscript \$TEMP/mqppep_anova.R
--inputFile '$input_file'
--alphaFile '$alpha_file'
- --firstDataColumn $first_data_column
+ --firstDataColumn $intensity_column_regex_f
--imputationMethod $imputation.imputation_method
#if $imputation.imputation_method == "random"
--meanPercentile '$imputation.meanPercentile'
@@ -45,6 +45,9 @@
$sample_grouping_regex
+
+ $intensity_column_regex
+
-
@@ -75,15 +78,15 @@
label="Mean percentile for random values"
help="[meanPercentile] Percentile center of random values; range [1,99]"
/>
-
+ help="[sample_names_regex] Pattern extracting sample-names from names of columns that have peptide intensity data (PERL-compatible regular expression)"
+ label="Sample-extraction pattern">
@@ -91,8 +94,8 @@
+ help="[sample_grouping_regex] Pattern extracting sample-group from the sample-names that are extracted by 'Sample-extraction pattern' (PERL-compatible regular expression)"
+ label="Group-extraction pattern">
@@ -112,7 +115,7 @@
-
+
@@ -128,10 +131,10 @@
-
+
-
+