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

Changeset 3:5aaab36bc523 (2018-01-15)
Previous changeset 2:e03582f26617 (2017-11-12) Next changeset 4:8bba31f628da (2018-03-04)
Commit message:
planemo upload for repository https://github.com/HegemanLab/w4mcorcov_galaxy_wrapper/tree/master commit 88004a3cf8868d68da1ec5bd2c1be53746350367
modified:
w4mcorcov.xml
w4mcorcov_calc.R
b
diff -r e03582f26617 -r 5aaab36bc523 w4mcorcov.xml
--- a/w4mcorcov.xml Sun Nov 12 19:45:36 2017 -0500
+++ b/w4mcorcov.xml Mon Jan 15 14:30:15 2018 -0500
b
@@ -1,4 +1,4 @@
-<tool id="w4mcorcov" name="OPLS-DA_Contrasts" version="0.98.5">
+<tool id="w4mcorcov" name="OPLS-DA_Contrasts" version="0.98.6">
 
   <description>OPLS-DA Contrasts of Univariate Results</description>
   
@@ -651,6 +651,10 @@
 Release notes
 -------------
 
+0.98.6
+
+- bug fix: set 'crossvalI' param (of R function 'ropls::opls') to the number of samples when the there are fewer than seven samples.
+
 0.98.5
 
 - bug fix: fit feature-labels within clipping region of cor-vs.cov plot
b
diff -r e03582f26617 -r 5aaab36bc523 w4mcorcov_calc.R
--- a/w4mcorcov_calc.R Sun Nov 12 19:45:36 2017 -0500
+++ b/w4mcorcov_calc.R Mon Jan 15 14:30:15 2018 -0500
[
@@ -7,7 +7,7 @@
 #### OPLS-DA
 algoC <- "nipals"
 
-do_detail_plot <- function(x_dataMatrix, x_predictor, x_is_match, x_algorithm, x_prefix, x_show_labels, x_show_loado_labels, x_progress = print, x_env) {
+do_detail_plot <- function(x_dataMatrix, x_predictor, x_is_match, x_algorithm, x_prefix, x_show_labels, x_show_loado_labels, x_progress = print, x_env, x_crossval_i) {
   off <- function(x) if (x_show_labels == "0") 0 else x
   if (x_is_match && ncol(x_dataMatrix) > 0 && length(unique(x_predictor))> 1) {
     my_oplsda <- opls(
@@ -18,6 +18,7 @@
       , orthoI = if (ncol(x_dataMatrix) > 1) 1 else 0
       , printL = FALSE
       , plotL  = FALSE
+      , crossvalI = x_crossval_i
       )
     my_oplsda_suppLs_y_levels <- levels(as.factor(my_oplsda@suppLs$y))
     fctr_lvl_1 <- my_oplsda_suppLs_y_levels[1]
@@ -305,6 +306,7 @@
         , x_show_labels = labelFeatures
         , x_show_loado_labels = labelOrthoFeatures
         , x_progress    = progress_action
+ , x_crossval_i  = min(7, length(chosen_samples))
         , x_env         = calc_env
         )
         if ( is.null(my_cor_cov) ) {
@@ -361,6 +363,7 @@
           , x_show_labels = labelFeatures
           , x_show_loado_labels = labelOrthoFeatures
           , x_progress    = progress_action
+   , x_crossval_i  = min(7, length(chosen_samples))
           , x_env         = calc_env
           )
           if ( is.null(my_cor_cov) ) {
@@ -414,6 +417,7 @@
               , x_show_labels = labelFeatures
               , x_show_loado_labels = labelOrthoFeatures
               , x_progress    = progress_action
+       , x_crossval_i  = min(7, length(chosen_samples))
               , x_env         = calc_env
               )
               if ( is.null(my_cor_cov) ) {
@@ -459,6 +463,7 @@
             , x_show_labels = labelFeatures
             , x_show_loado_labels = labelOrthoFeatures
             , x_progress    = progress_action
+     , x_crossval_i  = min(7, length(chosen_samples))
             , x_env         = calc_env
             )
             if ( is.null(my_cor_cov) ) {