Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gl.report.pa

Report private alleles (and fixed alleles) per pair of populations


Description

This function reports private alleles in one population compared with a second population, for all populations taken pairwise. It also reports a count of fixed allelic differences and the mean absolute allele frequency differences between pairs of populations.

Usage

gl.report.pa(gl1, gl2 = NULL, verbose = NULL)

Arguments

gl1

– name of the genlight object containing the SNP data [required]

gl2

– if two seperate genlight objects are to be compared this can be provided here [default NULL]

verbose

– verbosity: 0, silent, fatal errors only; 1, flag function begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2 or as specified using gl.set.verbosity]

Details

Note that the number of paired alleles between to populations is not a symmetric dissimilarity measure.

if no gl2 is provided, the function uses the pop(gl) hierachy to determine pairs of population, otherwise it runs a single comparison between gl1 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 alleles

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 -

Value

returns a data.frame. 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).

Author(s)

Examples

out <- gl.report.pa(testset.gl[1:20,])

dartR

Importing and Analysing SNP and Silicodart Data Generated by Genome-Wide Restriction Fragment Analysis

v1.9.6
GPL-2
Authors
Bernd Gruber [aut, cre], Arthur Georges [aut], Jose L. Mijangos [aut], Peter J. Unmack [ctb], Oliver Berry [ctb], Lindsay V. Clark [ctb], Floriaan Devloo-Delva [ctb]
Initial release
2021-04-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.