Scripts for Lin, Y., van der Bijl, W., Mank, J. E. Sexual selection maintains ancient structural polymorphisms across natural populations. 2026, PLOS Biology, in press
-
Genotyping and SNP filtering with female reference genome using BWA MEM, BCFtools and VCFtools
sh 01.genotyping.sh -
Running localPCA using lostruct
# plot all pops Rscript 02.1.plot_lostrcut.R # or do one population one chromosome for a single run Rscript 02.2.single_lostruct.R [pop] [chr] -
PCA and admixture using PLINK2.0
sh 03.run_pca_admixture.sh -
Inferring demogrphic history using PSMC
sh 04.run_psmc.sh -
Calculating Fst and nucleotide diversity using VCFtools
sh 05.calc_fst_pi.sh -
Calculating SV age using pixy
sh 06.cal_inv_age.sh -
Simulation, check the ./simulation folder for details.
-
Permutation test
sh run_perm_test.sh -
Breakpoint verification using Longranger and Loupe 2.1.2
-
Plotting, see details in Fig*.ipynb or SuppleFig*.ipynb.