Mercurial > repos > eschen42 > w4mcorcov
diff w4mcorcov_salience.R @ 6:0b49916c5c52 draft
planemo upload for repository https://github.com/HegemanLab/w4mcorcov_galaxy_wrapper/tree/master commit 4428e3252d54c8a8e0e5d85e8eaaeb13e9b21de7
author | eschen42 |
---|---|
date | Wed, 05 Sep 2018 19:24:47 -0400 |
parents | 50a07adddfbd |
children | ca9938f2eb6a |
line wrap: on
line diff
--- a/w4mcorcov_salience.R Fri Mar 02 08:26:36 2018 -0500 +++ b/w4mcorcov_salience.R Wed Sep 05 19:24:47 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