[adegenet-commits] r436 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Sep 2 13:55:43 CEST 2009


Author: jombart
Date: 2009-09-02 13:55:43 +0200 (Wed, 02 Sep 2009)
New Revision: 436

Modified:
   pkg/R/seqTrack.R
Log:
plotSeqTrack now handles again displaying arrows conditional on temporal ordering 


Modified: pkg/R/seqTrack.R
===================================================================
--- pkg/R/seqTrack.R	2009-09-02 11:47:30 UTC (rev 435)
+++ pkg/R/seqTrack.R	2009-09-02 11:55:43 UTC (rev 436)
@@ -315,9 +315,9 @@
     ##if(ncol(x) != 5) stop("x does not have five columns")
     if(ncol(xy) != 2) stop("xy does not have two columns")
     if(nrow(xy) != nrow(x)) stop("x and xy have inconsistent dimensions")
-    ## if(showAmbiguous & (is.null(mu0) | is.null(seq.length)) ){
-    ##         stop("showAmbiguous is TRUE, but mu0 and seq.length are not all provided.")
-    ##     }
+    if(!is.null(timeorder.thres) & (is.null(mu0) | is.null(seq.length)) ){
+        stop("timeorder.thres provided without mu0 and seq.length.")
+    }
     if(!is.null(support)){
         if(length(support)!=nrow(xy)) stop("Inconsistent length for support.")
     }
@@ -363,11 +363,15 @@
     }
 
 
-    ## ## FIND AMBIGUOUS TEMPORAL ORDERING ##
-    ##     if(showAmbiguous){
-    ##         temp <- .pAbeforeB(x$ances.date, x$date, mu0, seq.length)
-    ##         isAmbig <- temp < prob
-    ##     }
+    ## FIND AMBIGUOUS TEMPORAL ORDERING ##
+    if(!is.null(timeorder.thres)){
+        temp <- .pAbeforeBfast(x$ances.date, x$date, mu0, seq.length)
+        if(is.null(isAmbig)){
+            isAmbig <- temp < timeorder.thres
+        } else {
+            isAmbig <- isAmbig | (temp < timeorder.thres)
+        }
+    }
 
 
     ## FIND SEGMENTS COORDS ##



More information about the adegenet-commits mailing list