This repository contains the R package and documentation for delimitR, an R-package for performing species delimitation using Random Forests and the Site Frequency Spectrum.
These scripts will build a multidimensional allele frequency spectrum (mSFS) from an input matrix of SNPs. For use for as few as three and as many as ten populations. The SNP matrix is filtered to all bi-allelic SNPs, that equal or surpass the population thresholds. If a threshold that requires subsampling is used, the user can replicate the observed AFS N times due to the subsampling of alleles per SNP. Output is an observed allele frequency spectrum for use in fastsimcoal2. Scripts are available to use all or only unlinked SNPs to build the mSFS. This method is described in Smith et. al. (Mol. Ecol. 2017).
This script will coarsen a mSFS to include a user-defined number of classes per population. This script is written in python 2.7 and works for three or four populations (_3pops and _4pops, respectively). This method is described in Smith et. al. (Mol. Ecol. 2017).
This script will generate site frequency spectra under user-defined models and will use Random Forests to select the best model for an empirical dataset. This python script is written in python 2.7. This method is described in Smith et. al. (Mol. Ecol. 2017).