data(map)
dir <- system.file("extdata", package = "optiSel")
files <- file.path(dir, paste("Chr", unique(map$Chr), ".phased", sep=""))
f <- segIBD(files, map, minSNP=15, minL=1.0)
mean(f)
#[1] 0.05677993
# \donttest{
f <- segIBD(files, map, minSNP=15, minL=1.0, cores=NA)
mean(f)
#[1] 0.05677993
# }
## Multidimensional scaling of animals:
## (note that only few markers are used)
# \donttest{
data(Cattle)
library("smacof")
D <- sim2dis(f, 4)
color <- c(Angler="red", Rotbunt="green", Fleckvieh="blue", Holstein="black")
col <- color[as.character(Cattle$Breed)]
Res <- smacofSym(D, itmax = 5000, eps = 1e-08)
plot(Res$conf, pch=18, col=col, main="Multidimensional Scaling", cex=0.5)
mtext(paste("segIBD Stress1 = ", round(Res$stress,3)))
# }
Run the code above in your browser using DataLab