[adegenet-commits] r338 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 1 13:08:52 CEST 2009


Author: jombart
Date: 2009-06-01 13:08:52 +0200 (Mon, 01 Jun 2009)
New Revision: 338

Modified:
   pkg/R/seqTrack.R
Log:
color on arrows is now determined by number of mutations


Modified: pkg/R/seqTrack.R
===================================================================
--- pkg/R/seqTrack.R	2009-05-28 15:22:04 UTC (rev 337)
+++ pkg/R/seqTrack.R	2009-06-01 11:08:52 UTC (rev 338)
@@ -148,19 +148,21 @@
         if(is.null(mu0) & is.null(seq.length)) {
             col <- "black"
         } else {
-            w <- .pAbeforeB(x$ances.date, x$date, mu0, seq.length, 200) # beware, lots of steps take time
-            isAmbig <-  w < prob
-            w[w<.5] <- .5
-            w <- (1 - w)
-            w <- w - min(w) # rescale to 0-1
-            w <- 100*w/max(w)  # rescale to 0-100
-            w[w<1] <- 1
+            ##  w <- .pAbeforeB(x$ances.date, x$date, mu0, seq.length, 200) # beware, lots of steps take time
+            ##             isAmbig <-  w < prob
+            ##             w[w<.5] <- .5
+            ##             w <- (1 - w)
+            ##             w <- w - min(w) # rescale to 0-1
+            ##             w <- 100*w/max(w)  # rescale to 0-100
+            ##             w[w<1] <- 1
 
             opalette <- palette()
             on.exit(palette(opalette))
-            palette(heat.colors(51))
 
-            col <- w
+            w <- as.integer(round(x$weight))
+            col <- rep("yellow", length(w))
+            col[w <= 1] <- "orange"
+            col[w < 1] <- "red"
         }
     }
 



More information about the adegenet-commits mailing list