Download faststructure binary for your system from here (only runs on Mac or
Linux):
https://github.com/StuntsPT/Structure_threader/tree/master/structure_threader/bins
Move faststructure file to working directory. Make file executable using
terminal app.
system(paste0("chmod u+x ",getwd(), "/faststructure"))
Download plink binary for your system from here:
https://www.cog-genomics.org/plink/
Move plink file to working directory. Make file executable using
terminal app.
system(paste0("chmod u+x ",getwd(), "/plink"))
To install fastStructure dependencies follow these directions:
https://github.com/rajanil/fastStructure
fastStructure performs inference for the simplest, independent-loci,
admixture model, with two choices of priors that can be specified using
the --prior parameter. Thus, unlike Structure, fastStructure does not require
the mainparams and extraparam files. The inference algorithm used by
fastStructure is fundamentally different from that of Structure and
requires the setting of far fewer options.
To identify the number of populations that best approximates the marginal
likelihood of the data, the marginal likelihood is extracted from each run
of K, averaged across replications and plotted.