# NOT RUN {
# A sample SNP data set with no separators between nucleotides in a genotype
snps <- do.call(cbind, lapply(1:3, function(i) {
a1 <- sample(c("A", "G"), 10, rep = TRUE)
a2 <- sample(c("A", "G"), 10, rep = TRUE)
paste(a1, a2, sep = "")
}))
colnames(snps) <- paste("Loc", LETTERS[1:3], sep = "_")
snps
alleleSplit(snps)
# A sample microsatellie data set with alleles separated by "/"
alleles <- seq(100, 150, 2)
msats <- do.call(cbind, lapply(1:3, function(i) {
a1 <- sample(alleles, 10, rep = TRUE)
a2 <- sample(alleles, 10, rep = TRUE)
paste(a1, "/", a2, sep = "")
}))
colnames(msats) <- paste("Loc", LETTERS[1:3], sep = "_")
msats
alleleSplit(msats, sep = "/")
# }
Run the code above in your browser using DataLab