[adegenet-commits] r211 - in pkg: . R misc/bug-report.1.2-2.05
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Nov 21 10:02:07 CET 2008
Author: jombart
Date: 2008-11-21 10:02:07 +0100 (Fri, 21 Nov 2008)
New Revision: 211
Added:
pkg/misc/bug-report.1.2-2.05/.RData
pkg/misc/bug-report.1.2-2.05/FIXED
Modified:
pkg/R/monmonier.R
pkg/TODO
Log:
Bug 1.2-2.05 is now fixed.
Modified: pkg/R/monmonier.R
===================================================================
--- pkg/R/monmonier.R 2008-11-20 11:47:18 UTC (rev 210)
+++ pkg/R/monmonier.R 2008-11-21 09:02:07 UTC (rev 211)
@@ -17,16 +17,16 @@
if(nrow(xy) != nrow(as.matrix(dist))) stop('Number of sites and number of observations differ')
## set to TRUE to debug
-DEBUG <- FALSE
+## DEBUG <- FALSE
-if(DEBUG) {
- plot.nb(cn, xy, col="grey", points=FALSE)
- if(exists("x1")) {
- x1 <<- x1
- s.value(xy,x1,add.p=TRUE)
- }
- text(xy,lab=1:nrow(xy),font=2,col="darkgreen")
-}
+## if(DEBUG) {
+## plot.nb(cn, xy, col="grey", points=FALSE)
+## if(exists("x1")) {
+## x1 <<- x1
+## s.value(xy,x1,add.p=TRUE)
+## }
+## text(xy,lab=1:nrow(xy),font=2,col="darkgreen")
+## }
## PRECISION of the xy coordinates (in digits)
## used when coordinates are inputed in C code.
@@ -213,9 +213,9 @@
} else {temp <- 0}
## for debugging
- if(DEBUG) {
- if(temp==1) cat("\n can't go there (code",temp,")") else cat("\n new segment ok (code",temp,")")
- }
+ ## if(DEBUG) {
+ ## if(temp==1) cat("\n can't go there (code",temp,")") else cat("\n new segment ok (code",temp,")")
+ ## }
## if a code 1 or 3 is returned, CheckAllSeg returns FALSE
## else it returns TRUE
@@ -281,17 +281,17 @@
## 4) get back to 1)
while(keepExpanding){
hasExpanded <- FALSE # used to test if it is relevant to check for looping
- if(DEBUG){
- points(currentDir1$M[1],currentDir1$M[2],col="white",pch=20)
- points(currentDir2$M[1],currentDir2$M[2],col="white",pch=20)
- }
+ ## if(DEBUG){
+ ## points(currentDir1$M[1],currentDir1$M[2],col="white",pch=20)
+ ## points(currentDir2$M[1],currentDir2$M[2],col="white",pch=20)
+ ## }
if(s1 <= nrow(matSegVal)) { currentDir1 <- getNext(s1) }
if(s2 <= nrow(matSegVal)) { currentDir2 <- getNext(s2) }
- if(DEBUG){
- cat("\n\n ## dir1: trying edge",currentDir1$A[1],"-",currentDir1$B[1])
- points(currentDir1$M[1],currentDir1$M[2],col="blue",pch=20)
- readline("\npress enter")
- }
+ ## if(DEBUG){
+ ## cat("\n\n ## dir1: trying edge",currentDir1$A[1],"-",currentDir1$B[1])
+ ## points(currentDir1$M[1],currentDir1$M[2],col="blue",pch=20)
+ ## readline("\npress enter")
+ ## }
## first direction (dir1)
if( currentDir1$val > Dlim && s1 <= nrow(matSegVal)) {
@@ -315,19 +315,19 @@
## add 1 to the boundary length
current.bd.length <- current.bd.length + 1
hasExpanded <- TRUE
- if(DEBUG) {
- arrows(result[[run]]$dir1[[i1-1]]$M[1], result[[run]]$dir1[[i1-1]]$M[2],
- result[[run]]$dir1[[i1]]$M[1], result[[run]]$dir1[[i1]]$M[2],col="blue")
- }
+ ## if(DEBUG) {
+ ## arrows(result[[run]]$dir1[[i1-1]]$M[1], result[[run]]$dir1[[i1-1]]$M[2],
+ ## result[[run]]$dir1[[i1]]$M[1], result[[run]]$dir1[[i1]]$M[2],col="blue")
+ ## }
} else{ s1 <- s1+1 }
} # end "if( currentDir1$val>Dlim)"
- if(DEBUG){
- cat("\n\n ## dir2: trying edge",currentDir2$A[1],"-",currentDir2$B[1])
- points(currentDir2$M[1],currentDir2$M[2],col="red",pch=20)
- readline("\npress enter")
- }
+ ## if(DEBUG){
+ ## cat("\n\n ## dir2: trying edge",currentDir2$A[1],"-",currentDir2$B[1])
+ ## points(currentDir2$M[1],currentDir2$M[2],col="red",pch=20)
+ ## readline("\npress enter")
+ ## }
## second direction (dir2)
if( currentDir2$val > Dlim && s2 <= nrow(matSegVal)) {
@@ -350,10 +350,10 @@
## add 1 to the boundary length
current.bd.length <- current.bd.length + 1
hasExpanded <- TRUE
- if(DEBUG){
- arrows(result[[run]]$dir2[[i2-1]]$M[1], result[[run]]$dir2[[i2-1]]$M[2],
- result[[run]]$dir2[[i2]]$M[1], result[[run]]$dir2[[i2]]$M[2],col="red",cex=2)
- }
+ ## if(DEBUG){
+ ## arrows(result[[run]]$dir2[[i2-1]]$M[1], result[[run]]$dir2[[i2-1]]$M[2],
+ ## result[[run]]$dir2[[i2]]$M[1], result[[run]]$dir2[[i2]]$M[2],col="red",cex=2)
+ ## }
} else{ s2 <- s2+1 }
} # end "if( currentDir2$val>Dlim)"
@@ -392,14 +392,14 @@
}
## output for debugging
- if(DEBUG) {
- cat("\n","s1:",s1,"s2:",s2,"i1:",i1,"i2:",i2,"D1:",
- currentDir1$val,"D2:",currentDir2$val,"Dlim:",Dlim,
- "nrow(matSegVal)",nrow(matSegVal),"\n")
- cat("\n","D1:",currentDir1$val,"D2:",currentDir2$val,"Dlim:",Dlim,
- "cur.bd.le:", current.bd.length,"max length:", bd.length,"\n",
- "s1:",s1,"s2:",s2,"maxS:",nrow(matSegVal))
- }
+ ## if(DEBUG) {
+ ## cat("\n","s1:",s1,"s2:",s2,"i1:",i1,"i2:",i2,"D1:",
+ ## currentDir1$val,"D2:",currentDir2$val,"Dlim:",Dlim,
+ ## "nrow(matSegVal)",nrow(matSegVal),"\n")
+ ## cat("\n","D1:",currentDir1$val,"D2:",currentDir2$val,"Dlim:",Dlim,
+ ## "cur.bd.le:", current.bd.length,"max length:", bd.length,"\n",
+ ## "s1:",s1,"s2:",s2,"maxS:",nrow(matSegVal))
+ ## }
} # end of one given run
Modified: pkg/TODO
===================================================================
--- pkg/TODO 2008-11-20 11:47:18 UTC (rev 210)
+++ pkg/TODO 2008-11-21 09:02:07 UTC (rev 211)
@@ -31,7 +31,7 @@
* fix bug 1.2-2.03 (monmonier issue) -- fixed: was a non-detected code 2 due to intersection check with previously drawn segment (was not always removed). (TJ)
* fix request 1.2-2.04 (implement adjusted heretozygosity in summary)
* fix bug 1.2-2.05 (monmonier is such a pain is the ass)
-* !! comment the if(DEBUG) in monmonier when it is fixed
+* !! comment the if(DEBUG) in monmonier when it is fixed -- fixed, done and done (TJ)
# DOCUMENTATION ISSUES:
=======================
Added: pkg/misc/bug-report.1.2-2.05/.RData
===================================================================
(Binary files differ)
Property changes on: pkg/misc/bug-report.1.2-2.05/.RData
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: pkg/misc/bug-report.1.2-2.05/FIXED
===================================================================
--- pkg/misc/bug-report.1.2-2.05/FIXED (rev 0)
+++ pkg/misc/bug-report.1.2-2.05/FIXED 2008-11-21 09:02:07 UTC (rev 211)
@@ -0,0 +1 @@
+This bug has been fixed.
\ No newline at end of file
More information about the adegenet-commits
mailing list