[adegenet-commits] r586 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Feb 22 18:38:03 CET 2010


Author: jombart
Date: 2010-02-22 18:38:03 +0100 (Mon, 22 Feb 2010)
New Revision: 586

Modified:
   pkg/R/seqTrack.R
Log:
In SeqTrack, mu is know always given per day.


Modified: pkg/R/seqTrack.R
===================================================================
--- pkg/R/seqTrack.R	2010-02-22 14:45:43 UTC (rev 585)
+++ pkg/R/seqTrack.R	2010-02-22 17:38:03 UTC (rev 586)
@@ -37,8 +37,9 @@
 #############
 ##
 ## mu0 and L are vectors, having one value per segment/chromosome
+## mu0 is per nucleotide and per day
 .dTimeSeq <- function(mu0, L, maxNbDays=100){
-    mu <- mu0/365 # mutation rates / site / day
+    ##mu <- mu0/365 # mutation rates / site / day
     t <- 0:maxNbDays # in days added / substracted
     temp <- sapply((1-mu)^L, function(x) x^t  )
     Pt <- apply(temp,1,prod)
@@ -1103,7 +1104,7 @@
         anc.dates <- as.POSIXct(x$ances.date)
         nb.days <- abs(as.integer(anc.dates-dates))
         nb.mut <- x$weight
-        mu <- mu0/365
+        ##mu <- mu0/365
         ##mu <- mu*nb.days
 
         res <- dbinom(nb.mut, size=seq.length*nb.days, prob=mu)



More information about the adegenet-commits mailing list