/usr/lib/R/site-library/GenABEL/unitTests/runit.impute2xxx_large.R is in r-cran-genabel 1.7-6-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | ### --- Test setup ---
if(FALSE) {
## Not really needed, but can be handy when writing tests
library("RUnit")
library("GenABEL")
}
#test.empty <- function(){}
### do not run
#stop("SKIP THIS TEST")
###
# common functions and data
data_prefix = "big_data/KOM"
### --- Test functions ---
test.impute2xxx_large <- function()
{
unlink("*.fv?")
unlink("tmp*")
geno <- paste(data_prefix,".geno",sep="")
info <- paste(data_prefix,".info",sep="")
samp <- paste(data_prefix,".sample",sep="")
if (!(file.exists(geno) && file.exists(info) && file.exists(samp))) {
warning(paste("big files are missing; stopping tests"))
return(NULL)
}
out <- "KOM_test_out.geno"
fvdose <- impute2databel(geno=geno,
sample=samp,
out=out,
makeprob=TRUE,
old=FALSE)
checkIdentical("databel",class(fvdose)[1])
fvprob <- databel(paste(out,".prob",sep=""))
checkIdentical("databel",class(fvprob)[1])
checkIdentical(get_dimnames(fvdose)[[1]],get_dimnames(fvprob)[[1]])
checkIdentical(dim(fvdose)[1],dim(fvprob)[1])
prD2 <- (dim(fvprob)[2])/2
checkEqualsNumeric(prD2,dim(fvdose)[2])
rm(list=ls());gc()
unlink("*.fv?")
unlink("tmp*")
}
|