# A script to load the ingroup dataset, filter and combine sampling sites where numbers are low. # Set working Directory setwd("C:/workspace/R_analysis/R_crayfish/for_submission") # Replace as required gl <- readRDS("cherax_ingroup_only.Rdata") # Filter out loci without perfect repeatability or a call rate greater than 98% x <- gl.filter.callrate(gl, method="loc", 0.90) x <- gl.filter.secondaries(x) x <- gl.filter.repavg(x, 1) table(pop(x))