Estimates effective population size using the Linkage Disequilibrium method based on NeEstimator (V2)
This function is basically a convenience function that runs the LD Ne estimator using Neestimator2 (http://www.molecularfisherieslaboratory.com.au/neestimator-software/) within R using the provided genlight object. To be able to do so, the software has to be downloaded from their website and the appropriate executable Ne2-1 has to be copied into the path as specified in the function (see example below).
gl.LDNe( x, outfile = "genepopLD.txt", outpath = tempdir(), neest.path = getwd(), critical = 0, singleton.rm = TRUE, mating = "random", plot.out = TRUE, plot_theme = theme_dartR(), plot_colors_pop = discrete_palette, save2tmp = FALSE, verbose = NULL )
Name of the genlight object containing the SNP data [required].
File name of the output file with all results from Neestimator 2 [default 'genepopLD.txt'].
Path where to save the output file. Use outpath=getwd() or outpath='.' when calling this function to direct output files to your working directory [default tempdir(), mandated by CRAN].
Path to the folder of the NE2-1 file. Please note there are 3 different executables depending on your OS: Ne2-1.exe (=Windows), Ne2-1M (=Mac), Ne2-1L (=Linux). You only need to point to the folder (the function will recognise which OS you are running) [default getwd()].
(vector of) Critical values that are used to remove alleles based on their minor allele frequency. This can be done before using the gl.filter.maf function, therefore the default is set to 0 (no loci are removed). To run for MAF 0 and MAF 0.05 at the same time specify: critical = c(0,0.05) [default 0].
Whether to remove singleton alleles [default TRUE].
Formula for Random mating='random' or monogamy= 'monogamy' [default 'random'].
Specify if plot is to be produced [default TRUE].
User specified theme [default theme_dartR()].
A discrete palette for population colors or a list with as many colors as there are populations in the dataset [default discrete_palette].
If TRUE, saves any ggplots and listings to the session temporary directory (tempdir) [default FALSE].
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default 2, unless specified using gl.set.verbosity].
Custodian: Bernd Gruber (Post to https://groups.google.com/d/forum/dartr)