[Genabel-commits] r1185 - pkg/GenABEL/inst/unitTests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Apr 4 13:08:52 CEST 2013
Author: yurii
Date: 2013-04-04 13:08:52 +0200 (Thu, 04 Apr 2013)
New Revision: 1185
Modified:
pkg/GenABEL/inst/unitTests/runit.exports.R
Log:
added regression test for bug [#2525]
Modified: pkg/GenABEL/inst/unitTests/runit.exports.R
===================================================================
--- pkg/GenABEL/inst/unitTests/runit.exports.R 2013-04-04 10:06:36 UTC (rev 1184)
+++ pkg/GenABEL/inst/unitTests/runit.exports.R 2013-04-04 11:08:52 UTC (rev 1185)
@@ -27,7 +27,7 @@
nTestSnps <- sample(c(10:min(1000,nsnps(ge03d2.clean))),1)
dta <- ge03d2.clean[sort(sample(1:nids(ge03d2.clean),nTestIds)),
sort(sample(1:nsnps(ge03d2.clean),nTestSnps))]
-
+
export.plink(dta,filebasename="tmpOld",dpieceFun="old")
export.plink(dta,filebasename="tmpNew",dpieceFun="new")
xO <- read.table(file="tmpOld.ped",head=FALSE,strings=FALSE)
@@ -80,3 +80,19 @@
unlink("tmpTrans*")
}
+
+test.export.merlin.bug2525 <- function()
+{
+ data(srdta)
+ export.merlin(
+ srdta[,1:2],dpieceFun="new",
+ mapfile="tmpNew.map",pedfile="tmpNew.ped",datafile="tmpNew.dat"
+ )
+ export.merlin(
+ srdta[,1:2],dpieceFun="old",
+ mapfile="tmpOld.map",pedfile="tmpOld.ped",datafile="tmpOld.dat"
+ )
+ xO <- read.table(file="tmpOld.ped",head=FALSE,strings=FALSE)
+ xN <- read.table(file="tmpNew.ped",head=FALSE,strings=FALSE)
+ checkIdentical(xN,xO)
+}
\ No newline at end of file
More information about the Genabel-commits
mailing list