Convert data frame of allele frequencies to nested lists
Convert data frame of allele frequencies to nested lists
List-izes the output of reference_allele_counts into a usable format for allelic_list
a_freq_list(D, pop_level ="collection")
Arguments
D: the long-format dataframe of counts by collection, locus, and allele, output by reference_allele_counts, to be made into a nested list
Returns
a_freq_list returns a list named by loci, each element of which is a matrix containing that locus's allele count data. Rows in the matrix mark alleles, and columns collections
Examples
# Generate a list of individual genotypes by allele from# the alewife data's reference allele count tables example(reference_allele_counts) ale_ac <- a_freq_list(ale_rac)