diff waveica_wrapper.R @ 3:dbbedb14b44c draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/waveica commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
author recetox
date Thu, 12 Oct 2023 13:45:41 +0000
parents 6480c6d5fa36
children 425c0494ec2d
line wrap: on
line diff
--- a/waveica_wrapper.R	Fri Jun 23 07:27:29 2023 +0000
+++ b/waveica_wrapper.R	Thu Oct 12 13:45:41 2023 +0000
@@ -109,8 +109,7 @@
 
   data <- sort_by_injection_order(data)
 
-  feature_columns <- colnames(data)[!colnames(data) %in%
-    c(required_columns, optional_columns)]
+  feature_columns <- colnames(data)[!colnames(data) %in% c(required_columns, optional_columns)]
   features <- data[, feature_columns]
   injection_order <- data$injectionOrder
 
@@ -137,14 +136,9 @@
 
 sort_by_injection_order <- function(data) {
   if ("batch" %in% colnames(data)) {
-    data <- data[order(data[, "batch"],
-      data[, "injectionOrder"],
-      decreasing = FALSE
-    ), ]
+    data <- data[order(data[, "batch"], data[, "injectionOrder"], decreasing = FALSE), ]
   } else {
-    data <- data[order(data[, "injectionOrder"],
-      decreasing = FALSE
-    ), ]
+    data <- data[order(data[, "injectionOrder"], decreasing = FALSE), ]
   }
   return(data)
 }