[adegenet-commits] r422 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jun 23 14:17:07 CEST 2009
Author: jombart
Date: 2009-06-23 14:17:06 +0200 (Tue, 23 Jun 2009)
New Revision: 422
Modified:
pkg/R/haploSim.R
pkg/R/seqTrack.R
Log:
various fixes to make both files compatible.
Modified: pkg/R/haploSim.R
===================================================================
--- pkg/R/haploSim.R 2009-06-23 11:51:01 UTC (rev 421)
+++ pkg/R/haploSim.R 2009-06-23 12:17:06 UTC (rev 422)
@@ -476,7 +476,7 @@
## CALL TO PLOTSEQTRACK ##
plotSeqTrack(x=res, xy=xy, annot=annot, dateRange=dateRange,
- col=col, bg=bg, add=add, showAmbiguous=FALSE, ...)
+ col=col, bg=bg, add=add, ...)
return(invisible(res))
@@ -516,7 +516,7 @@
sampdates <- .rTimeSeq(mu0=mu0, L=L, n=length(truedates), maxNbDays=daterange/2)
} else{
arg.rDate$n <- n
- sampdates <- do.call(.rTimeSeq, arg.rDate)
+ sampdates <- do.call(rDate, arg.rDate)
}
sampdates <- truedates + abs(sampdates)
Modified: pkg/R/seqTrack.R
===================================================================
--- pkg/R/seqTrack.R 2009-06-23 11:51:01 UTC (rev 421)
+++ pkg/R/seqTrack.R 2009-06-23 12:17:06 UTC (rev 422)
@@ -212,13 +212,17 @@
## FIND THE COLOR FOR EDGES ##
- if(is.null(col) & !is.null(support)){
- opalette <- palette()
- on.exit(palette(opalette))
+ if(is.null(col)){
+ if(!is.null(support)){
+ opalette <- palette()
+ on.exit(palette(opalette))
- w <- support/max(support,na.rm=TRUE) # support from 0 to 1
- w <- 1 + ((1-w)*99)
- col <- w
+ w <- support/max(support,na.rm=TRUE) # support from 0 to 1
+ w <- 1 + ((1-w)*99)
+ col <- w
+ } else{
+ col <- rep("black", length(from))
+ }
}
More information about the adegenet-commits
mailing list