changeset 3:5aaab36bc523 draft

planemo upload for repository https://github.com/HegemanLab/w4mcorcov_galaxy_wrapper/tree/master commit 88004a3cf8868d68da1ec5bd2c1be53746350367
author eschen42
date Mon, 15 Jan 2018 14:30:15 -0500
parents e03582f26617
children 8bba31f628da
files w4mcorcov.xml w4mcorcov_calc.R
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/w4mcorcov.xml	Sun Nov 12 19:45:36 2017 -0500
+++ b/w4mcorcov.xml	Mon Jan 15 14:30:15 2018 -0500
@@ -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
--- 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) ) {