diff w4mcorcov_calc.R @ 3:61935618f92c draft

planemo upload for repository https://github.com/HegemanLab/w4mcorcov_galaxy_wrapper/tree/master commit 7682e8e7ae2bfb926d94b414b9a1649389f33582
author eschen42
date Sun, 12 Nov 2017 16:40:57 -0500
parents a06344808ffc
children d3bb34e764fe
line wrap: on
line diff
--- a/w4mcorcov_calc.R	Sat Nov 11 00:08:20 2017 -0500
+++ b/w4mcorcov_calc.R	Sun Nov 12 16:40:57 2017 -0500
@@ -34,7 +34,7 @@
         lim_x <- max(sapply(X=c(min_x, max_x), FUN=abs))
         covariance <- covariance / lim_x
         lim_x <- 1.2
-        main_label <- sprintf("%s for levels %s versus %s", x_prefix, fctr_lvl_1, fctr_lvl_2)
+        main_label <- sprintf("%s for level %s versus %s", x_prefix, fctr_lvl_1, fctr_lvl_2)
         main_cex <- min(1.0, 46.0/nchar(main_label))
         # "It is generally accepted that a variable should be selected if vj>1, [27–29],
         #   but a proper threshold between 0.83 and 1.21 can yield more relevant variables according to [28]."
@@ -50,8 +50,8 @@
           y = plus_cor
         , x = plus_cov
         , type="p"
-        , xlim=c(-lim_x, lim_x + off(0.2))
-        , ylim=c(-1.0 - off(0.2), 1.0)
+        , xlim=c( -lim_x - off(0.2), lim_x + off(0.2) )
+        , ylim=c( -1.0   - off(0.2), 1.0   + off(0.2) )
         , xlab = sprintf("relative covariance(feature,t1)")
         , ylab = sprintf("correlation(feature,t1)")
         , main = main_label
@@ -90,9 +90,9 @@
           text(
             y = plus_cor - 0.013
           , x = plus_cov + 0.020
-          , cex = 0.3
+          , cex = 0.4
           , labels = labels
-          , col = rgb(blue = blue, red = red, green = 0, alpha = 0.2 + 0.8 * alpha)
+          , col = rgb(blue = 0, red = 0, green = 0, alpha = 0.5) # rgb(blue = blue, red = red, green = 0, alpha = 0.2 + 0.8 * alpha)
           , srt = -30 # slant 30 degrees downward
           , adj = 0   # left-justified
           )