# Creation of tuto.geno
# A file containing 400 SNPs for 50 individuals.
data("tutorial")
write.geno(tutorial.R,"genotypes.geno")
# The following command are equivalent with
# project = snmf("genotypes.geno", entropy = TRUE, K = 3)
# cross.entropy(project)
# Creation of the masked data file
# Create file: "genotypes_I.geno"
output = create.dataset("genotypes.geno")
# run of snmf with genotypes_I.geno and K = 3
project = snmf("genotypes_I.geno", K = 3, project = "new")
# calculate the cross-entropy
res = cross.entropy.estimation("genotypes.geno", K = 3, "genotypes_I.geno",
"./genotypes_I.snmf/K3/run1/genotypes_I_r1.3.Q",
"./genotypes_I.snmf/K3/run1/genotypes_I_r1.3.G")
# get the result
res$masked.ce
res$all.ce
#remove project
remove.snmfProject("genotypes_I.snmfProject")
Run the code above in your browser using DataLab