  Genetic variation in human populations is influenced by geographic ancestry
due to spatial locality in historical mating and migration patterns. Spatial
population structure in genetic datasets has been traditionally analyzed using
either model-free algorithms, such as principal components analysis (PCA) and
multidimensional scaling, or using explicit spatial probabilistic models of
allele frequency evolution. We develop a general probabilistic model and an
associated inference algorithm that unify the model-based and data-driven
approaches to visualizing and inferring population structure. Our algorithm,
Geographic Ancestry Positioning (GAP), relates local genetic distances between
samples to their spatial distances, and can be used for visually discerning
population structure as well as accurately inferring the spatial origin of
individuals on a two-dimensional continuum. On both simulated and several real
datasets from diverse human populations, GAP exhibits substantially lower error
in reconstructing spatial ancestry coordinates compared to PCA.
  Our spatial inference algorithm can also be effectively applied to the
problem of population stratification in genome-wide association studies (GWAS),
where hidden population structure can create fictitious associations when
population ancestry is correlated with both the genotype and the trait. We
develop an association test that uses the ancestry coordinates inferred by GAP
to accurately account for ancestry-induced correlations in GWAS. Based on
simulations and analysis of a dataset of 10 metabolic traits measured in a
Northern Finland cohort, which is known to exhibit significant population
structure, we find that our method has superior power to current approaches.
