Repository 'w4mcorcov'
hg clone https://toolshed.g2.bx.psu.edu/repos/eschen42/w4mcorcov

Changeset 9:06c51af11531 (2018-08-10)
Previous changeset 8:342570ad880c (2018-08-04) Next changeset 10:9a52306991b3 (2018-09-01)
Commit message:
planemo upload for repository https://github.com/HegemanLab/w4mcorcov_galaxy_wrapper/tree/master commit fda7ea61f0a082fd0c28730e471e66c92aaa04d0
modified:
w4mcorcov.xml
w4mcorcov_lib.R
w4mcorcov_salience.R
w4mcorcov_wrapper.R
b
diff -r 342570ad880c -r 06c51af11531 w4mcorcov.xml
--- a/w4mcorcov.xml Sat Aug 04 17:43:16 2018 -0400
+++ b/w4mcorcov.xml Fri Aug 10 11:15:31 2018 -0400
[
b'@@ -1,4 +1,4 @@\n-\xef\xbb\xbf<tool id="w4mcorcov" name="OPLS-DA_Contrasts" version="0.98.12">\n+\xef\xbb\xbf<tool id="w4mcorcov" name="OPLS-DA_Contrasts" version="0.98.13">\n     <description>OPLS-DA Contrasts of Univariate Results</description>\n     <macros>\n         <xml name="paramPairSigFeatOnly">\n@@ -20,8 +20,14 @@\n         </xml>\n     </macros>\n     <requirements>\n+        <!--\n+        <requirement type="package" version="3.4.1">r-base</requirement>\n+        <requirement type="package" version="1.1_4">r-batch</requirement>\n+        <requirement type="package" version="1.2.14">bioconductor-ropls</requirement>\n+        -->\n+        <requirement type="package">r-base</requirement>\n         <requirement type="package">r-batch</requirement>\n-        <requirement type="package">bioconductor-ropls</requirement>\n+        <requirement type="package" version="1.10.0">bioconductor-ropls</requirement>\n     </requirements>\n     <command detect_errors="aggressive"><![CDATA[\n     Rscript \'$__tool_directory__/w4mcorcov_wrapper.R\'\n@@ -54,13 +60,12 @@\n   ]]></command>\n \n     <inputs>\n-        <param name="dataMatrix_in" type="data" format="tabular" label="Data matrix file"\n-            help="Features x samples (tabular data - decimal: \'.\'; missing: NA; mode: numerical; separator: tab character)" />\n-        <param name="sampleMetadata_in" type="data" format="tabular" label="Sample metadata file"\n-            help="Samples x metadata (tabular data - decimal: \'.\'; missing: NA; mode: character or numerical; separator: tab character)" />\n-        <param name="variableMetadata_in" type="data" format="tabular"\n-            label="Variable metadata file (ideally from Univariate)"\n-            help="Features x metadata (tabular data - decimal: \'.\'; missing: NA; mode: character or numerical; separator: tab character)" />\n+        <param name="dataMatrix_in" format="tabular" label="Data matrix file" type="data"\n+            help="variables &#10006; samples" />\n+        <param name="sampleMetadata_in" format="tabular" label="Sample metadata file" type="data"\n+            help="sample metadata, one row per sample" />\n+        <param name="variableMetadata_in" format="tabular" label="Variable metadata file (ideally from Univariate)"\n+            type="data" help="variable metadata, one row per variable" />\n         <param name="facC" type="text"\n             label="Factor of interest"\n             help="REQUIRED - The name of the column of sampleMetadata corresponding to the qualitative variable used to define the contrasts.  Except when the \'Univariate Significance-test\' is set to \'none\', this also must be a portion of the column names in the variableMetadata file."/>\n@@ -149,7 +154,7 @@\n         * Wiklund_2008 covariance\n         * Galindo_Prieto_2014 VIP for predictive components, VIP[4,p]\n         * Galindo_Prieto_2014 VIP for orthogonal components, VIP[4,o]\n-        * (When filtering on significance of univariate tests) Significance of test of null hypothesis that there is no difference between the two classes, i.e, the pair-wise test.\n+        * When filtering on significance of univariate tests,significance of test of null hypothesis that there is no difference between the two classes, i.e, the pair-wise test.\n     -->\n     <data name="contrast_corcov" format="tabular" label="${tool.name}_${variableMetadata_in.name}_corcov" />\n     <!--\n@@ -424,7 +429,7 @@\n It must be stressed that there may be no *single* definitive computational approach to select features that are reliable biomarkers, especially from a small number of samples or experiments.  A few possible choices are:\n \n - picking features with maximum loadings along the projection parallel to the predictor (loadp),\n-- examining extreme values on S-PLOTs (for which covariance is linearly related to loadp),\n+- examining extreme values on S-PLOTs\n - examining "variable importance in projection VIP for OPLS-DA" (Galindo-Prieto *et al.* 2014), and\n - examining a feature\'s "selectivity ratio" (Rajalahti *et al.*'..b'raw.githubusercontent.com/HegemanLab/w4mcorcov_galaxy_wrapper/master/test-data/expected_contrast_detail_lohi.pdf               |\n-  +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+\n+  +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+\n+  | Input Parameter or Result                  | Value                                                                                                                                        |\n+  +============================================+==============================================================================================================================================+\n+  | Factor of interest                         | lohi                                                                                                                                         |\n+  +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+\n+  | Univariate Significance-Test               | none                                                                                                                                         |\n+  +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+\n+  | Levels of interest                         | low,high                                                                                                                                     |\n+  +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+\n+  | Level-name matching                        | use regular expressions for matching level-names                                                                                             |\n+  +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+\n+  | Number of features having extreme loadings | 3                                                                                                                                            |\n+  +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+\n+  | Output primary table                       | https://raw.githubusercontent.com/HegemanLab/w4mcorcov_galaxy_wrapper/master/tools/w4mcorcov/test-data/expected_contrast_corcov_lohi.tsv     |\n+  +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+\n+  | Output salience table                      | https://raw.githubusercontent.com/HegemanLab/w4mcorcov_galaxy_wrapper/master/tools/w4mcorcov/test-data/expected_contrast_salience_lohi.tsv   |\n+  +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+\n+  | Output figures PDF                         | https://raw.githubusercontent.com/HegemanLab/w4mcorcov_galaxy_wrapper/master/tools/w4mcorcov/test-data/expected_contrast_detail_lohi.pdf     |\n+  +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+\n \n \n Trademarks\n'
b
diff -r 342570ad880c -r 06c51af11531 w4mcorcov_lib.R
--- a/w4mcorcov_lib.R Sat Aug 04 17:43:16 2018 -0400
+++ b/w4mcorcov_lib.R Fri Aug 10 11:15:31 2018 -0400
[
@@ -1,3 +1,12 @@
 suppressMessages(library(batch))
 # suppressMessages(library(foreach))
 suppressMessages(library(ropls))
+suppressMessages(library(methods))
+
+# cat("Installed packages:",stderr())
+# write.table((installed.packages(.Library, priority = "high"))[, c(1,3:5)], stderr())
+# cat("Loaded packages:",stderr())
+# write(.packages(), stderr())
+
+print(sessionInfo())
+
b
diff -r 342570ad880c -r 06c51af11531 w4mcorcov_salience.R
--- a/w4mcorcov_salience.R Sat Aug 04 17:43:16 2018 -0400
+++ b/w4mcorcov_salience.R Fri Aug 10 11:15:31 2018 -0400
[
@@ -61,8 +61,8 @@
   )
   rcvOfFeatureBySampleClassLevel[is.nan(rcvOfFeatureBySampleClassLevel)] <- max(9999,max(rcvOfFeatureBySampleClassLevel, na.rm = TRUE)) 
 
-  # "For each feature, 'select max(median_feature_intensity) from feature'."
-  maxApplyMedianOfFeatureBySampleClassLevel <- sapply(
+  # "For each feature, 'select max(max_feature_intensity) from feature'."
+  maxApplyMaxOfFeatureBySampleClassLevel <- sapply(
       X = 1:n_features
     , FUN = function(i) {
         match(
@@ -84,19 +84,19 @@
     # the feature name
     feature = features
     # the name (or factor-level) of the class-level with the highest median intensity for the feature
-  , max_level = medianOfFeatureBySampleClassLevel[maxApplyMedianOfFeatureBySampleClassLevel,1]
+  , max_level = medianOfFeatureBySampleClassLevel[maxApplyMaxOfFeatureBySampleClassLevel,1]
     # the median intensity for the feature and the level max_level
   , max_median = sapply(
         X = 1:n_features
       , FUN = function(i) {
-          maxOfFeatureBySampleClassLevel[maxApplyMedianOfFeatureBySampleClassLevel[i], 1 + i]
+          maxOfFeatureBySampleClassLevel[maxApplyMaxOfFeatureBySampleClassLevel[i], 1 + i]
         }
     )
     # the coefficient of variation (expressed as a proportion) for the intensity for the feature and the level max_level
   , max_rcv = sapply(
         X = 1:n_features
       , FUN = function(i) {
-          rcvOfFeatureBySampleClassLevel[maxApplyMedianOfFeatureBySampleClassLevel[i], i]
+          rcvOfFeatureBySampleClassLevel[maxApplyMaxOfFeatureBySampleClassLevel[i], i]
         }
     )
     # the mean of the medians of intensity for all class-levels for the feature
b
diff -r 342570ad880c -r 06c51af11531 w4mcorcov_wrapper.R
--- a/w4mcorcov_wrapper.R Sat Aug 04 17:43:16 2018 -0400
+++ b/w4mcorcov_wrapper.R Fri Aug 10 11:15:31 2018 -0400
b
@@ -55,12 +55,6 @@
 source(paste(script.dir, "w4mcorcov_salience.R", sep="/")) 
 source(paste(script.dir, "w4mcorcov_calc.R", sep="/")) 
 source(paste(script.dir, "w4mcorcov_output.R", sep="/")) 
-#source("w4mcorcov_lib.R")
-#source("w4mcorcov_util.R")
-#source("w4mcorcov_input.R")
-#source("w4mcorcov_salience.R")
-#source("w4mcorcov_calc.R")
-#source("w4mcorcov_output.R")
 
 ## log file
 ##---------