This function reports seperates the genlight object by populations and reports fixed alleles, the pairwise private alleles and the mean absolute allele frequency differences between pair of population.
gl.report.pa.pop(gl, gl2 = NULL)
-- name of the genlight object containing the SNP data [see Details]
-- if two seperate genlight objects are to be compared this can be provided here [see Details]
A data.frame will be returned. Each row shows for a pair of populations the number of individuals in a population, the number of loci with fixed differences (same for both populations) in pop1 (compared to pop2) and vice versa. Same for private alleles and finally the absolute mean allele frequendy difference between loci (mdf).
if no gl2 is provided, the function uses the pop(gl) hierachy to determine pairs of population, otherwise it runs a single comparison between gl and gl2. Hint: in case you want to run comparison between individuals you can simply redefine your pop(gl) via indNames(gl) [Assuming individual names are unique]
Definition of fixed and private allels
The table shows a cross table of possible cases of allele frequencies between two populations (0=homozygote for Allele 1,x= both Alleles are present, 1=homozygote for Allele 2)
p: cases where there is a private allele in pop1 compared to pop2 (but not vice versa)
f: cases where there is a fixed allele in pop1 (and pop2, as those cases are symmetric)
pop1 | ||||
0 | x | 1 | ||
0 | - | p | p,f | |
pop2 | x | - | - | - |
1 | p,f | p | - |
# NOT RUN {
gl.report.pa.pop(testset.gl[1:20,])
# }
Run the code above in your browser using DataLab