[adegenet-commits] r372 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jun 5 14:42:40 CEST 2009
Author: jombart
Date: 2009-06-05 14:42:40 +0200 (Fri, 05 Jun 2009)
New Revision: 372
Modified:
pkg/R/haploSim.R
Log:
optimize.seqTrack.haploSim is complete.
Have to test all that now
Modified: pkg/R/haploSim.R
===================================================================
--- pkg/R/haploSim.R 2009-06-05 12:37:41 UTC (rev 371)
+++ pkg/R/haploSim.R 2009-06-05 12:42:40 UTC (rev 372)
@@ -378,15 +378,21 @@
## optimize.seqTrack.haploSim
##############################
optimize.seqTrack.haploSim <- function(x, thres=0.2, optim=c("min","max"),
- prox.mat=NULL, nstep=10, step.size=1e3, mu0, seq.length,
- rMissDate=.rUnifTimeSeq, ...){
+ prox.mat=NULL, nstep=10, step.size=1e3, rMissDate=.rUnifTimeSeq, ...){
x <- dist.dna(x$seq, model="raw")
seq.names <- labels(x)
seq.dates <- as.POSIXct(sim)
seq.length <- ncol(x$seq)
+ prevCall <- as.list(x$call)
+ if(is.null(prevCall$mu)){
+ mu0 <- 0.0001
+ } else {
+ mu0 <- prevCall$mu
+ }
- res <- optimize.seqTrack.default(x, seq.names, seq.dates, thres=0.2, optim=c("min","max"),
- prox.mat=NULL, nstep=10, step.size=1e3, mu0, seq.length,
- rMissDate=.rUnifTimeSeq, ...)
+ res <- optimize.seqTrack.default(x=x, seq.names=seq.names, seq.dates=seq.dates,
+ thres=thres, optim=optim, prox.mat=prox.mat,
+ nstep=nstep, step.size=step.size, mu0=mu0,
+ seq.length=seq.length, rMissDate=rMissDate, ...)
}
More information about the adegenet-commits
mailing list