[adegenet-commits] r623 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue May 11 09:47:51 CEST 2010
Author: jombart
Date: 2010-05-11 09:47:51 +0200 (Tue, 11 May 2010)
New Revision: 623
Modified:
pkg/R/haploGen.R
Log:
cleaning the sources...
Modified: pkg/R/haploGen.R
===================================================================
--- pkg/R/haploGen.R 2010-05-10 16:01:23 UTC (rev 622)
+++ pkg/R/haploGen.R 2010-05-11 07:47:51 UTC (rev 623)
@@ -355,28 +355,7 @@
-####################
-## na.omit.haploGen
-####################
-##
-## ACTUALLY THIS FUNCTION MAKES NO SENSE FOR NOW
-## AS STRAINS WITH NO ANCESTOR MAY BE ANCESTORS OF
-## OTHER STRAINS.
-##
-## na.omit.haploGen <- function(object, ...){
-## res <- object
-## isNA <- is.na(res$ances)
-## res$seq <- res$seq[!isNA,]
-## res$ances <- res$ances[!isNA]
-## res$dates <- res$dates[!isNA]
-## if(!is.null(res$xy)) res$xy <- res$xy[!isNA,]
-## return(res)
-## }
-
-
-
-
##################
## labels.haploGen
##################
@@ -386,6 +365,8 @@
+
+
#######################
## as.POSIXct.haploGen
#######################
@@ -397,6 +378,8 @@
+
+
#####################
## seqTrack.haploGen
#####################
@@ -421,60 +404,6 @@
-## #####################
-## ## seqTrackG.haploGen
-## #####################
-## seqTrackG.haploGen <- function(x, optim=c("min","max"), ...){
-## myX <- dist.dna(x$seq, model="raw")
-## x.names <- labels(x)
-## x.dates <- as.POSIXct(x)
-## seq.length <- ncol(x$seq)
-## myX <- myX * seq.length
-## prevCall <- as.list(x$call)
-## if(is.null(prevCall$mu)){
-## mu0 <- 0.0001
-## } else {
-## mu0 <- eval(prevCall$mu)
-## }
-## res <- seqTrackG(myX, x.names=x.names, x.dates=x.dates, best=optim,...)
-## return(res)
-## }
-
-
-
-
-
-
-##############################
-## optimize.seqTrack.haploGen
-##############################
-## optimize.seqTrack.haploGen <- function(x, thres=0.2, optim=c("min","max"),
-## typed.chr=NULL, mu0=NULL, chr.length=NULL,
-## prox.mat=NULL, nstep=10, step.size=1e3,
-## rDate=.rTimeSeq, arg.rDate=NULL, rMissDate=.rUnifTimeSeq, ...){
-
-## x.names <- labels(x)
-## x.dates <- as.POSIXct(x)
-## seq.length <- ncol(x$seq)
-## myX <- dist.dna(x$seq, model="raw") * seq.length
-## prevCall <- as.list(x$call)
-## if(is.null(prevCall$mu)){
-## mu0 <- 0.0001
-## } else {
-## mu0 <- eval(prevCall$mu)
-## }
-
-## res <- optimize.seqTrack.default(x=myX, x.names=x.names, x.dates=x.dates,
-## typed.chr=typed.chr, mu0=mu0, chr.length=chr.length,
-## thres=thres, optim=optim, prox.mat=prox.mat,
-## nstep=nstep, step.size=step.size,
-## rDate=rDate, arg.rDate=arg.rDate, rMissDate=rMissDate, ...)
-## } # end optimize.seqTrack.haploGen
-
-
-
-
-
########################
## as.seqTrack.haploGen
########################
@@ -589,8 +518,6 @@
-
-
##########################
## as("haploGen", "graphNEL")
##########################
@@ -612,3 +539,64 @@
res <- ftM2graphNEL(ft=cbind(from$ances[!areNA], from$id[!areNA]), W=w, edgemode = "directed", V=from$id)
return(res)
})
+
+
+
+
+
+
+
+
+
+
+
+
+## #####################
+## ## seqTrackG.haploGen
+## #####################
+## seqTrackG.haploGen <- function(x, optim=c("min","max"), ...){
+## myX <- dist.dna(x$seq, model="raw")
+## x.names <- labels(x)
+## x.dates <- as.POSIXct(x)
+## seq.length <- ncol(x$seq)
+## myX <- myX * seq.length
+## prevCall <- as.list(x$call)
+## if(is.null(prevCall$mu)){
+## mu0 <- 0.0001
+## } else {
+## mu0 <- eval(prevCall$mu)
+## }
+## res <- seqTrackG(myX, x.names=x.names, x.dates=x.dates, best=optim,...)
+## return(res)
+## }
+
+
+
+
+
+
+##############################
+## optimize.seqTrack.haploGen
+##############################
+## optimize.seqTrack.haploGen <- function(x, thres=0.2, optim=c("min","max"),
+## typed.chr=NULL, mu0=NULL, chr.length=NULL,
+## prox.mat=NULL, nstep=10, step.size=1e3,
+## rDate=.rTimeSeq, arg.rDate=NULL, rMissDate=.rUnifTimeSeq, ...){
+
+## x.names <- labels(x)
+## x.dates <- as.POSIXct(x)
+## seq.length <- ncol(x$seq)
+## myX <- dist.dna(x$seq, model="raw") * seq.length
+## prevCall <- as.list(x$call)
+## if(is.null(prevCall$mu)){
+## mu0 <- 0.0001
+## } else {
+## mu0 <- eval(prevCall$mu)
+## }
+
+## res <- optimize.seqTrack.default(x=myX, x.names=x.names, x.dates=x.dates,
+## typed.chr=typed.chr, mu0=mu0, chr.length=chr.length,
+## thres=thres, optim=optim, prox.mat=prox.mat,
+## nstep=nstep, step.size=step.size,
+## rDate=rDate, arg.rDate=arg.rDate, rMissDate=rMissDate, ...)
+## } # end optimize.seqTrack.haploGen
More information about the adegenet-commits
mailing list