Analyses in SAMBAR https://github.com/mennodejong1986/SambaR.git Once imported the dataset, SNPs have to be filtered using command filterdata(indmiss=0.5,snpmiss=0.05) #to generate dataset A, Dataset A excluded samples with more than 50% missing data and all loci with greater than 5% missing data. filterdata(indmiss=0.25,snpmiss=0.05) #to generate dataset B.Dataset B excluded samples with more than 25% missing data and all loci with greater than 5% missing data NOTE: most of the following commands can be found with SambaR manual https://github.com/mennodejong1986/SambaR/blob/master/sambaR_manual.docx To preform structure analyses as PCoA and LEA and f3 run findstructure() TO EXTRACT INPUT FILE FOR ALL OTHER ANALYSES Run the command in SambaR esportsambarfiles() INPUT FILES FOR ARLEQUIN TO PERFORM FST use PGD Spider (link for download http://www.oracle.com/technetwork/java/javase/downloads/index.html) to convert ped file in .arp file now you can use .arp file in Arlequin (link for download http://cmpg.unibe.ch/software/arlequin35/win/WinArl35.zip ) to perform Fst INPUT FILE FOR BAYESASS generated with exportsambarfiles() In a Unix environment, run the software Bayesass : BA3-SNPS-Ubuntu64 --file Bayesassinput.immanc.txt --loci XXXXX -u -t -s 10 -i 1000000 -b 100000 TO RUN ADMIXTURE use .ped file generated with exportsambarfiles() command Use plink to convert the ped file into a bed file: plink --file metapop.retainedinds.filter.number --allow-extra-chr --make-bed --recode A --out metapop.retainedinds.filter.number In a Unix environment, run the software ADMIXTURE for k=2 ./admixture –cv metapop.retainedinds.filter.number.bed 2 –j4 for k=3 ./admixture –cv metapop.retainedinds.filter.number.bed 3 –j4 Note: at the end of the run you get cross validation error The .Q file generated will be used to plot results (see https://dalexander.github.io/admixture/admixture-manual.pdf) TREEMIX The input file 'Treemixinput.snpsfilter.txt' was generated from autosomal data using the SambaR command: exportsambarfiles() The Treemix output files were generated using the commands: gzip Treemixinput.snpsfilter.txt In a Unix environment, run the software Treemix /treemix -i Treemixinput.snpsfilter.txt.gz -bootstrap -k 500 -m 1 -root Atl -o replicate1 DEMOGRAPHY SFS-vectors generated by ANGSD https://github.com/ANGSD/angsd.git for each dataset In a Unix environment, run the software ANGSD ./angsd -out outFileName -bam bam.filelist -GL 1 -doMaf 1 -doMajorMinor 1 -nThreads 10 Once you have SFS, in a Unix environment, rub the software stairwayplot https://github.com/xiaoming-liu/stairway-plot-v2.git open the file two-epoch_fold.blueprint’ and edit as suggested in the manual https://github.com/xiaoming-liu/stairway-plot-v2/raw/master/READMEv2.1.pdf then run the following command: java -cp stairway_plot_es Stairbuilder mypop.blueprint & and bash mypop.blueprint.sh &