Testing spatial clustering by genetic cline
To test whether the genetic clusters from sNMF are the consequence of natural genetic clusters or isolation by distance (IBD) with discontinuous sampling, we used the R package conStruct version 1.0.4 (Bradburd, Coop, & Ralph, 2018). We compare the non-spatial (cluster) and spatial (IBD) models for K=1 to K=10 ancestral populations. The input allele frequencies of SNPs from fully-filtered dataset were calculated using VCFtools version 0.1.17 (Danecek et al., 2011), and the geographical distances among populations were calculated using R package geodist version 0.0.4 (Karney, 2013). In the conStruct package, we ran cross-validation analysis through K=3 to K=10 with ten replicates and 100,000 iterations of the MCMC chains for each K. The predictive accuracies were estimated with 90% training and 10% test data. Two-sample t-tests were used to test differences between spatial and non-spatial models for each K. Moreover, we also consider the preferred models by examining the layer contributions from K=1 to K=10 using the construct function, with two MCMC chains of 100,000 iterations (Bradburd, Coop, & Ralph, 2018).