[adegenet-commits] r616 - in pkg: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon May 10 15:29:14 CEST 2010


Author: jombart
Date: 2010-05-10 15:29:13 +0200 (Mon, 10 May 2010)
New Revision: 616

Modified:
   pkg/R/seqTrack.R
   pkg/man/seqTrack.Rd
Log:
On the way to making seqTrack a useable thing.
Redefining methods/generics/defaults.



Modified: pkg/R/seqTrack.R
===================================================================
--- pkg/R/seqTrack.R	2010-05-06 20:40:41 UTC (rev 615)
+++ pkg/R/seqTrack.R	2010-05-10 13:29:13 UTC (rev 616)
@@ -5,6 +5,11 @@
     UseMethod("seqTrack")
 }
 
+seqTrack.default <- function(x, ...){
+    cat("\nseqTrack not implemented for object of the class", class(x),"\n")
+    return(invisible(NULL))
+}
+
 ## seqTrackG <- function(...){
 ##     UseMethod("seqTrackG")
 ## }
@@ -199,7 +204,7 @@
 ## - prox.mat is a directed proximity measure, so that prox.mat[i,j] is
 ## the 'proximity when going from i to j'
 ##
-seqTrack.default <- function(x, x.names, x.dates, best=c("min","max"),
+seqTrack.matrix <- function(x, x.names, x.dates, best=c("min","max"),
                      prox.mat=NULL, mu=NULL, haplo.length=NULL, ...){
 
     ## CHECKS ##
@@ -312,7 +317,7 @@
     class(res) <- c("seqTrack","data.frame")
 
     return(res)
-} # end seqTrack.default
+} # end seqTrack.matrix
 
 #######################################################
 #######################################################

Modified: pkg/man/seqTrack.Rd
===================================================================
--- pkg/man/seqTrack.Rd	2010-05-06 20:40:41 UTC (rev 615)
+++ pkg/man/seqTrack.Rd	2010-05-10 13:29:13 UTC (rev 616)
@@ -14,30 +14,45 @@
 % \alias{get.consensus}
 \alias{as,seqTrack,graphNEL-method}
 \alias{coerce,seqTrack,graphNEL-method}
-\title{SeqTrack algorithm}
+\title{SeqTrack algorithm for reconstructing genealogies}
 \description{
-  Important: this method is currently under review. It will be
-  documented once accepted for publication.
-  Please email the author if you are interested in using it.
+  The SeqTrack algorithm aims at reconstructing genealogies of sampled
+  haplotypes or genotypes for which a sampling date is
+  available. Contrary to phylogenetics which aims at reconstructing
+  hypothetical, unbserved most recent common ancestors (MRCA), SeqTrack
+  considers that both ancestors and descendents are sampled together.
 
+  This approach proved more efficient than phylogenetic approaches for
+  reconstructing transmission trees in densely sampled disease outbreaks
+  [1]. This implementation defines a generic function \code{seqTrack}
+
 }
-% \usage{
-% %seqTrack(seq.names, seq.dates, W, optim = c("min", "max"), \dots)
-% %plotSeqTrack(x, xy, useArrows = TRUE, col = NULL, bg = "grey", add = FALSE, 
-%  %   \dots)
-% }
-% \arguments{
-%   % \item{seq.names}{}
-%   % \item{seq.dates}{}
-%   % \item{W}{}
-%   % \item{optim}{}
-%   % \item{x}{}
-%   % \item{xy}{}
-%   % \item{useArrows}{}
-%   % \item{col}{}
-%   % \item{bg}{}
-%   % \item{add}{}
-%   % \item{\dots}{}
-%   % \item{}{}
-% }
+\usage{
+
+\method{seqTrack}{matrix}(x, x.names, x.dates, best = c("min", "max"), prox.mat = NULL, 
+    mu = NULL, haplo.length = NULL,  \dots)
+
+plotSeqTrack(x, xy, useArrows = TRUE, annot = TRUE, labels = NULL, 
+    dateRange = NULL, col = NULL, bg = "grey", add = FALSE, quiet = FALSE, 
+    support = NULL, support.thres = 0.5, timeorder.thres = NULL, 
+    mu = NULL, seq.length = NULL, col.pal = heat.colors, plot = TRUE, \dots)
+}
+\arguments{
+  \item{seq.names}{}
+  \item{seq.dates}{}
+  \item{W}{}
+  \item{optim}{}
+  \item{x}{}
+  \item{xy}{}
+  \item{useArrows}{}
+  \item{col}{}
+  \item{bg}{}
+  \item{add}{}
+  \item{\dots}{}
+  \item{}{}
+}
 \author{Thibaut Jombart \email{t.jombart at imperial.ac.uk}}
+\references{
+  Jombart T, Eggo R, Dodd P, Balloux F (accepted) Reconstructing disease
+  outbreaks from genetic data: a graph approach. Heredity.
+}
\ No newline at end of file



More information about the adegenet-commits mailing list