From 39f046848de26e2f748d8dd9fa9cbdffb058bf93 Mon Sep 17 00:00:00 2001 From: Gavin Rhys Lloyd Date: Wed, 16 Jun 2021 09:58:28 +0100 Subject: [PATCH] improve filtering of features without ... ... sufficient numbers of paired samples. Implementation now identical to ttest. --- DESCRIPTION | 2 +- R/wilcox_test_class.R | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4967d3b..c90fa2f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: structToolbox Type: Package Title: Some tools bult using the struct package -Version: 0.8.3 +Version: 0.8.5 Author: Gavin Rhys Lloyd Maintainer: Gavin Rhys Lloyd Description: Extends the class templates provided by the struct package to provide methods for training PCA, PLS models with cross-validation, permutation testing etc. diff --git a/R/wilcox_test_class.R b/R/wilcox_test_class.R index 5191315..a6a809b 100644 --- a/R/wilcox_test_class.R +++ b/R/wilcox_test_class.R @@ -146,8 +146,9 @@ setMethod(f="model.apply", D=predicted(FF) # check equal numbers per class. if not equal then exclude. - out=FF$count[,1]!=FF$count[,2] - D$data=D$data[,!out] + IN=rownames(FF$count)[(FF$count[,1]==FF$count[,2]) & (FF$count[,1]>2) & (FF$count[,2]>2)] + D$data=D$data[,IN] + D$variable_meta=D$variable_meta[IN,] }