if (FALSE) {
# Run this example in a working directory with write permissions
myo <- system.file("extdata", "myotis.vcf", package = "diemr")
vcf2diem(myo, "myo")
fit <- diem("myo-001.txt", ChosenInds = 1:14)
gen <- importPolarized("myo-001.txt", changePolarity = fit$markerPolarity, ChosenInds = 1:14)
h <- apply(gen, 1, \(x) pHetErrOnStateCount(sStateCount(x)))[1, ]
gen2 <- smoothPolarizedGenotypes(genotypes = gen,
includedSites = "myo-includedSites.txt", windowSize = 50)
plotPolarized(gen, h)
plotPolarized(gen2, h)
}
Run the code above in your browser using DataLab