Checks if the list containing sample data is conformable to provided population allele frequencies and reformats it if needed.
Details
The function reorders loci and alleles in dsmp to match those
in afreq and inserts alleles into dsmp if they are present in
afreq and not in dsmp; doesn't handle cases when alleles are
present in dsmp but not in afreq. Allele names are required
for this procedure.
Examples
afile <- system.file("extdata", "MozAfreq.csv", package = "dcifer")
afreq <- readAfreq(afile, lvar = "locus", avar = "allele", fvar = "freq")
da_upd <- matchAfreq(dsmp, afreq, minfreq = 1e-3)
dsmp2 <- da_upd$dsmp
afreq2 <- da_upd$afreq