diff w4mcorcov_salience.R @ 9:06c51af11531 draft

planemo upload for repository https://github.com/HegemanLab/w4mcorcov_galaxy_wrapper/tree/master commit fda7ea61f0a082fd0c28730e471e66c92aaa04d0
author eschen42
date Fri, 10 Aug 2018 11:15:31 -0400
parents 23f9fad4edfc
children 2ae2d26e3270
line wrap: on
line diff
--- 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