Likelihood of social-ecological genetic model

preprint OA: closed CC-BY-4.0
📄 Open PDF Full text JSON View at publisher

Abstract

The genetic structure of populations depends on two parallel processes - genetic and social-ecological - providing mutual information. Models that describe species’ responses within social-ecological systems are increasingly important in the context of modern environmental crises. Advances in genetic data collection now provide access to vast numbers of markers, enabling a more comprehensive understanding of species dynamics. However, current statistical inference methods do not fully integrate these processes into a single cohesive model, and rely on summary statistics derived from separate inferences and simulations. In this work, I propose a probabilistic framework based on a coalescent model to compute the likelihood of a demogenetic model represented as connected graphs. The population graph, linking population nodes, is characterized by a backward gene adjacency matrix, which describes the probability of gene origins and is influenced by niche and dispersal functions. The genetic graph, linking allele nodes, captures mutation probabilities. A third graph represents the coalescence process of genes within the demographic and genetic graphs. Coalescence is simulated within the demographic model, and its probability is estimated based on the genetic model, or vice versa. Likelihood estimation is performed using a Monte Carlo algorithm. This framework allow likelihood-based sampling and Bayesian inference, offering a robust approach for environmental niche and meta-population modeling. I also discuss the practical applications of this model. By combining environmental niche functions with a coalescent framework, this approach enables probabilistic reconstructions of past species distributions based on present and historical occurrence data. It can incorporate various data sources, including historical records, absence data, and genetic information. By integrating niche and dispersal processes into a unified model, this framework provides a powerful tool for improving species distribution forecasting and deepening our understanding of species’ responses to environmental change as interconnected systems. Author summary Inferring biodiversity responses to social-ecosystem history using population genetic and environmental history data is crucial in the context of modern environmental crises. However, existing models do not fully integrate key processes such as niche modeling, coalescent modeling, and genetic modeling, often relying on approximate Bayesian computation for inference. In this work, I propose a method to estimate the likelihood of a fully integrated demo-genetic model that links population genetic data with socio-ecosystem history. The proposed method is based on a hidden coalescent process simulated within a social-ecosystem graph, along with a sampling process represented in a genetic mutation graph. In the social-ecosystem graph, nodes represent populations, and their effective sizes are estimated using niche models that account for environmental variables. The edges of the graph represent effective migration, which is estimated through connectivity models. The resulting likelihood function can be used for Bayesian or maximum likelihood inference of genetic changes within socio-ecosystems. This approach offers a flexible framework for inferring demo-genetic models across various fields, including phylogeography, agrobiodiversity evolution, ecology, and epidemiology. It can be applied for forecasting or hypothesis testing, providing a comprehensive tool for understanding genetic dynamics in relation to socio-ecosystem processes.
Full text 53,435 characters · extracted from preprint-html · click to expand
Likelihood of social-ecological genetic model | bioRxiv /* */ /* */ <!-- <!-- /*! * yepnope1.5.4 * (c) WTFPL, GPLv2 */ (function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0];var j=d.createElement(s);var dl=l!='dataLayer'?'&l='+l:'';j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;j.type='text/javascript';j.async=true;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-M677548'); Skip to main content Home About Submit ALERTS / RSS Search for this keyword Advanced Search New Results Likelihood of social-ecological genetic model View ORCID Profile Stéphane Dupas , View ORCID Profile Camilo Patarroyo doi: https://doi.org/10.1101/2025.03.06.641298 Stéphane Dupas 1 Laboratoire Evolution, Génome, Comportement et Écologie, Univ Paris-Sud, CNRS , IRD 247, 1 Avenue de la Terrasse, 91198 Gif-sur-Yvette Cedex, France Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Stéphane Dupas For correspondence: Stephane.Dupas{at}ird.fr Camilo Patarroyo 2 Department of Biological Sciences, Universidad de los Andes , Bogotá D.C., Colombia Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Camilo Patarroyo Abstract Full Text Info/History Metrics Data/Code Preview PDF Abstract The genetic structure of populations depends on two parallel processes - genetic and social-ecological - providing mutual information. Models that describe species’ responses within social-ecological systems are increasingly important in the context of modern environmental crises. Advances in genetic data collection now provide access to vast numbers of markers, enabling a more comprehensive understanding of species dynamics. However, current statistical inference methods do not fully integrate these processes into a single cohesive model, and rely on summary statistics derived from separate inferences and simulations. In this work, I propose a probabilistic framework based on a coalescent model to compute the likelihood of a demogenetic model represented as connected graphs. The population graph, linking population nodes, is characterized by a backward gene adjacency matrix, which describes the probability of gene origins and is influenced by niche and dispersal functions. The genetic graph, linking allele nodes, captures mutation probabilities. A third graph represents the coalescence process of genes within the demographic and genetic graphs. Coalescence is simulated within the demographic model, and its probability is estimated based on the genetic model, or vice versa. Likelihood estimation is performed using a Monte Carlo algorithm. This framework allow likelihood-based sampling and Bayesian inference, offering a robust approach for environmental niche and meta-population modeling. I also discuss the practical applications of this model. By combining environmental niche functions with a coalescent framework, this approach enables probabilistic reconstructions of past species distributions based on present and historical occurrence data. It can incorporate various data sources, including historical records, absence data, and genetic information. By integrating niche and dispersal processes into a unified model, this framework provides a powerful tool for improving species distribution forecasting and deepening our understanding of species’ responses to environmental change as interconnected systems. Author summary Inferring biodiversity responses to social-ecosystem history using population genetic and environmental history data is crucial in the context of modern environmental crises. However, existing models do not fully integrate key processes such as niche modeling, coalescent modeling, and genetic modeling, often relying on approximate Bayesian computation for inference. In this work, I propose a method to estimate the likelihood of a fully integrated demo-genetic model that links population genetic data with socio-ecosystem history. The proposed method is based on a hidden coalescent process simulated within a social-ecosystem graph, along with a sampling process represented in a genetic mutation graph. In the social-ecosystem graph, nodes represent populations, and their effective sizes are estimated using niche models that account for environmental variables. The edges of the graph represent effective migration, which is estimated through connectivity models. The resulting likelihood function can be used for Bayesian or maximum likelihood inference of genetic changes within socio-ecosystems. This approach offers a flexible framework for inferring demo-genetic models across various fields, including phylogeography, agrobiodiversity evolution, ecology, and epidemiology. It can be applied for forecasting or hypothesis testing, providing a comprehensive tool for understanding genetic dynamics in relation to socio-ecosystem processes. Introduction In the context of the modern ecological crisis, understanding species’ responses to socio-ecosystem changes has become one of the most fundamental scientific challenges in ecology. Ecological niche theory is useful for predicting species’ responses; however, realized niches also depend on species interactions and historical dispersal events. Genes remain the fundamental unit of information transmission, making them particularly relevant for studying species’ responses in social-ecological systems [ 1 ]. The increasing availability of molecular data provides valuable complementary insights into realized niches. One approach to integrating genetic information focuses on ‘omics, examining emergent properties from individuals to populations and ecosystems [ 2 ]. Other approaches emphasize population-level processes, both adaptive and neutral. Population genetic structure is shaped by adaptive (selection) and neutral forces (drift, mutation, migration). Many genetic and genomic studies now focus on documenting adaptive processes, particularly those related to global change and niche differentiation between populations [ 3 ]. A promising research direction is to consider neutral forces, including dispersal processes and historical events [ 4 ]. The presence of a gene at a given site is determined both by its environmental niche and its ability to reach that location through spatial and socio-ecological networks. A significant advance in recent decades has been bridging the gap between population genetics and ecological niches. Niche models provide insights into past abundance and migration patterns. Drift is influenced by reduced population size and can be linked to environmental variables through niche functions. Existing models generally separate inference into two steps: first, estimating species distribution parameters from occurrence data, and second, inferring genetic evolution parameters from genetic data [ 5 ]. The term Integrated Distribution Demographic and Coalescence Model (IDDC) [ 6 ] was introduced to describe these efforts. Several simulation tools now allow genetic parameter inference within discrete or continuous species distribution landscapes [ 6 – 10 ]. Most of these models use niche modeling to simulate species distribution, construct evolutionary force landscapes, and perform coalescence simulations using Approximate Bayesian Computation (ABC). Many spatially explicit tools are available [ 9 ], with SPLATCHE [ 7 , 11 , 12 ] being one of the most advanced. This software enables the simulation of genetic data based on historical demographic maps and introduction scenarios. However, these IDDC approaches still present some limitations. The first major limitation is the lack of full integration of niche, demographic, and genetic processes into a single model. In existing IDDC models, demographic parameter maps are not inferred but rather approximated using species distribution maps. There is no inference algorithm that simultaneously integrates demographic parameters, environmental relationships, and coalescent processes. Separating demographic and genetic inference is problematic because genetic drift does not depend solely on absolute population size but also on effective population size and migration rates [ 4 ]. Additionally, niche models used as proxies for historical reconstruction are typically based on occurrence or presence-absence data, which themselves depend on historical contingencies such as migration and extinction. Thus, there is no justification for treating niche and historical processes separately in demogenetic inference. Integrating niche and genealogical modeling would address these issues. QuetzalCoalT [ 13 ] is currently the only available tool capable of performing integrated inference of genetic and niche-based processes from environmental history and genetic structure. Recognizing that demographic and genetic processes should be fully integrated, we propose the term environmental demogenetics, as the ultimate inference model should incorporate environmental, demographic, and genetic data. Furthermore, most IDDC and environmental demogenetic models fail to integrate social-ecological networks, which are increasingly crucial in the Anthropocene era (e.g., agricultural practices, ethnic groups, trade routes). The second major challenge of IDDC approaches is performing inference in the context of complex historical and high-dimensional processes. The relationship between environmental and genetic processes is typically a high-dimensional, unknown coalescent process. Consequently, models rely on simulations, with inference performed using ABC on summary statistics. ABC inference compares observed data with data generated by random simulators, making it particularly useful for Bayesian inference when likelihoods are intractable or highly complex. This is a common situation in population biology, where ecological and genetic data are the result of multiple unobservable processes—including genealogy, ecological interactions, genetic evolution, and sampling—that are highly interdependent and contingent. In ABC, priors are sampled based on summary statistics rather than exact likelihood calculations. However, this approach has drawbacks: information may be lost when transforming data into summary statistics, and there is no universal method for selecting appropriate summary statistics. Each inference problem requires a custom selection, and it is impossible to definitively prove that the chosen summary statistics capture all relevant aspects of the modeled process [ 14 ]. These limitations do not exist in likelihood-based inference. To address these challenges, we propose a novel approach that: Integrates social-ecological history, demographic processes, and genetic processes within a single inference model. Directly incorporates multiple data sources, including genetic data, ecological occurrence data, and environmental history. Accounts for both spatial and non-spatial networks, including social-ecological networks. Performs exact likelihood-based probabilistic modeling, rather than relying on approximations. Our metamodel consists of three interconnected graphs: A genetic graph, where nodes represent alleles and edges represent mutations. A population graph, where nodes represent populations and edges represent migration events. A coalescent graph, where nodes represent individuals and edges represent lineages. The coalescent process serves as a fundamental link between genetic and demographic sampling processes. We propose two approaches for likelihood sampling within this metamodel using genetic status and demographic location data. First, coalescence can be simulated based on sample locations within the population graph, and the probability of the coalescent, the genetic data and graph model can be calculated. Alternatively, genealogy can be simulated within the genetic graph, and the probability of observed demographic locations can be calculated for the coalescent. This framework enables both likelihood-based and Bayesian inference. By integrating potential niche parameters (related to scenopoietic variables) with historical processes shaping the realized niche, this approach should enhance our understanding of species distributions and improve future projections ( Figure 1 ). Download figure Open in new tab Figure 1. Social ecological demogenetic likelihood computation. Two approaches are considered. Approach 1: simulate coalescent from population information and calculate its probability from genetic information. Or Approach 2: simulate from genetic and calculate probability from populations. Sim : simulation of coalescent knowing one type of data and model. Pr : probability of coalescent knowing the other type of data and model. Demo-genetic Model I present below the variables and parameters of the different graph models conforming the demogenetic model. The population graph represents populations, the genetic graph represents alleles and the coalescence history graph represent sample coalescing lineages ( Table 2 , figures 1 , 2 , 3 ). View this table: View inline View popup Download powerpoint Table 1. Definition of variables used in the model View this table: View inline View popup Download powerpoint Table 2. Signification of the variables Download figure Open in new tab Figure 2. The coalescent graph H C (green nodes) and the individuals coalescent graph H I (yellow nodes). S : Sampled individuals. In : Internal coalescence nodes. V I [ i ]: Nodes representing individuals within to the coalescent lineages. H C = ( V C , E C ) consists of vertices V C = S ∪ In and edges, E C , which define the lineages connecting them. The individuals along these edges belong to H I . t : generation time. Download figure Open in new tab Figure 3. Examples of population graphs and a coalescence history graph simulated within a population graph. (A.1) Social-Ecological Network Demographic Graph with 4 nodes, . (B.1) Landscape Demographic Graph with 6 nodes, where nodes correspond to raster cells or vector map contours. (B.2) Backward population transition matrix among nodes in . (C.1) Combined Social-Ecological and Landscape Demographic Graph ,integrating and . V P [ i ]: Node (deme) i. Xe i : Environmental variables associated with node V P [ i ]. Ne ( X i ): Effective population size of node V P [ i ]. (B.3) Construction of the 24 × 24 backward gene population transition matrix M P , characterizing the edges of for coalescence simulations. (C) Movement and coalescence of a sample S = { S 1 , S 2 , …} within represents the coalescence history graph on ,where H C = ( V C , E C ) consists of vertices V C = S ∪ I C (with I C as internal nodes of V C ) and edges E C , representing the lineages connecting them. The population graph , noted G P = ( V P , E P ). I first consider demographic history in a general random walk across a population graph model, representing populations as nodes (in spatial or ecological dimensions) and migration as edges ( Figure 3 ). The population graph can represent a geographic landscape ,a socioecological network ,or a combination of both ( Figure 3 ). The variables characterizing populations can also vary over time. Additionally, the migration function can depend on space and environment.( Figure 3 ). Each node V P [ i ] represents a distinct population with an effective population size Ne [ i ]. Each edge E P [ i, j ] is characterized by a backward gene transition probability M P [ i, j ], which represents the probability that a gene in node V P [ i ] originated from node V P [ j ] in the previous generation. This probability depends on the effective population sizes of both the receiving and originating demes N e , and the migration rate m [ i, j ], which is the proportion of individuals migrating from node j to node i in forward time. The effective population size Ne is defined by a niche model , which relates Ne to environmental variables Xe i,t and model parameters . The migration rate m[i,j] is defined by a migration rate model m ,which relates m to a distance measure between nodes i and j , incorporating migration-friction parameters . The number of demes (the order of the graph) is denoted as | D |, while the number of migration connections (the degree of the graph) is denoted as | E P |. The matrix M P represents the backward transition probabilities between populations. The genetic connected graph, denoted as G G = ( S G , E G ) We now consider the coalescence in the genetic graph, where nodes represent alleles and edges represent mutations. Each node V G [ i ] represents an allele state. Each edge E G [ i, j ] represents a mutation event that is characterized by the probability M G [ i, j ], that a gene in node V G [ i ] have mutated from node V G [ j ] in the previous generation. The matrix M G represents mutation rate between alleles. The number of alleles (the order of the graph) is noted | V G | while the number of mutation connections (the degree of the graph) is denoted | E G |. The coalescence history graph, denoted H C ( S ): H C ( S ) is an directed graph that traces the lineage of a genetic sample S back to their common ancestor, which edges oriented opposite to those in a traditional genealogical graph ( Figure 2 ). Each node V C [ i ] represents either a sample S or a coalescence point. Each edge E C [ u, v ] represents a lineage connecting a node to its next coalescence point. The coalescence history graph is defined as HC=(VC,EC) H C = ( V C , E C ), where E C = {( u, v ) ∈ V C , where v is parent of u}). Sampled individuals S i = V C [ i ] with i = {1.. n } are defined as nodes with zero in-degree. These individuals are linked to their ancestors through coalescence events, which correspond to internal nodes In . Internal nodes are characterized by having more than one in-degree and exactly one outdegree, except for the most recent common ancestor (MRCA), which has more than one in-degree and zero out-degree. The individual colaescence graph, denoted H I ( S ) ( Figure 2 ). The individual colaescence graph H I ( S ) is an extended graph that includes the coalescence history graph and all individuals along the edges of the coalescence history graph that constitute its lineages. It is defined as H I = ( I, E I ). Such that V C ⊂ I , and E I = {( u, v ) | v is the parent of u in the previous generation} Each node represents an individual kin the genealogy of the sampled genes. It is either a node from H C ( S ), or an individual positionned along the vertices V C ( S ) between two connected nodes of H C . H I ( S ), as H C ( S ) is an acyclic graph oriented from the sampled individuals to the common ancestor. Each individual I [ i ] ∈ I is has a unique parent formally expressed as card( Adj ( I [ i ]) = 1. The descendants of I [ i ] are obtained by Adj −1 ( I [ i ]). Each individual of H C is fully defined within the coalescent tree by one of its descendant, including sampled descendant S i and the generation time ( Figure 2 ). The probability of a coalescence history graph H C depends on both the genetic graph and the population graph. To estimate the likelihood of the demogenetic model given environmental, demographic, and genetic data, we will simulate coalescence history graphs within the population graph and compute their probabilities under the genetic graph. All the variables and terms used in this paper are described in the table 2 . Simulation of genealogy knowing demographic model The first method of likelihood calculation consists of simulating a genealogy of the sample in a population graph, and then evaluating its probability in the genetic graph. The species observation data used in the model may include genetic information on the individuals reported, but this is not always required. To analyze the movements and coalescence of gene lineages within the population graph, we first compute the population transition matrix , M P . This matrix is a Markov transition matrix that estimates the evolution of occurrence probabilities among demes. Each cell [ i, j ] represents the backward in-time probability, that a gene in deme (or node) i originates from deme (or node) j . Where Γ( i ) represents the set of all demes directly connected to is the probability function of migration from deme i to deme j according to the migration model ,and is the effective population size given by a niche model that depends on environmental variables and parameters. Note that corresponds to the probability that genes remain in the same deme. Additionally, the matrix satisfies the condition ∑ j M P [ i, j ] = 1, ensuring that transition probabilities sum to one. We will consider coalescence events sequentially, from the most recent sampling date back to the MRCA, proceeding by pairs of lineages. To represent coalescence nodes, we observe that the function An ( S [ i ], t ) is an injection from S × t ( I ) to I : each individual can be uniquely identified in G I by one of its descendant, in particular in the sample, and its generation time. Note that if coalescence event occur at time t between two lineages An ( I [ i ], .) and An ( I [ j ], .), then for any earlier time τ such that τ ≤ t , it follows that: ⇒ An ( I [ i ], τ ) = An ( I [ j ], τ ). If no coalescence occur, the evolution of the, matrix P P ( S, t ) from time t to t − 1 is given by : which describes the transition between generations Similarly, if no coalescence occurs, the general term at time t is : Consider two ancestors An ( S [ i ], t ) and An ( S [ j ], t ) that have not yet coalesced at generation t . The probability that they coesist in the same deme in the previous generation t − 1 is given by the scalar product of their population distribution probabilities at generation t : The probability that they coalesce in the previous generation ( t − 1) is obtained by dividing the vector of coexistence probabilities across demes by twice the effective population size predicted by the niche model in each corresponding deme N e ( X ( t − 1)): Where ⊘ is the element-wise division operator. If two lineages coalesce, the probability distribution of their common ancestor given the demographic model, is given by performing an element-wise multiplication of the distribution probabilities of the two lineages, followed by an element-wise division by the population size. The result is then normalized by the probability of coalescence. Where: bla ⊙ represents element-wise bla ⊘ represents element-wise division. Using these equations of genetic distribution and coalescence probability from one generation to the parent, we can simulate their genealogy using the following algorithm. Algorithm 1 Demographic simulation of a coalescent Initialize generation time: Define t = max{t | card(An(S, t)) < 2}, i.e., the most recent time when at least two lineages exist. Compute the genetic distribution: Calculate the genetic distribution PP (S, t) using equation (3). Simulate coalescence events in pairs: (a) Randomly select a pair of lineages in the set An(S, t). (b) Simulate their coalescence at t – 1 with the probability defined in equation (5). Update lineages if coalescence occurs: (a) If the selected pair coalesces, merge their lineages. (b) Update their demographic distribution using equation (6). (c) Record the event in a genealogy object, including the probability distribution of each remaining lineage. Repeat for all remaining pairs: Return to step 3 until all pairs in An(S, t) have been tested for coalescence. Move to the previous generation: Decrease the time by setting t = t ߝ 1. Repeat until complete coalescence: Return to step 2 until all lineages have merged into a single ancestor. Probability of a genealogy knowing genetic model In the first approach, we consider a coalescent simulated under a known demographic model, as described in Algorithm 1. Let us consider a coalescent graph H C simulated under a given demographic model. We calculate the probability of each coalescence point under genetic model p ( In [ k ] | θ G ), characterized by t ( In [ k ]) = t C and its descendant nodes denoted as In [ k ] d = Adj −1 ( In [ k ]). The number of descendant lineages coalescing at In [ k ] is given by In [ k ] Nd = card( In [ k ] d ) = card( Adj −1 ( In [ k ])). This number can be 2 in the case of a dichotomy or greater in the case of a polytomy. These coalescence events occur at times t ( In [ k ] d ). If the lineages have not coalesced at any more recent time, the probability that they co-occur in the same genetic state (i.e., in the same population) at t | t ≤ min In [ k ] D , given the genetic model θ G , is given by the scalar product of the probability distributions of each individual in In [ k ] d at time t (obtained from equation (3) applied to individuals in In [ k ] d ). Where “∏ ·” represents the scalar product of the vectors. The probability of coalescence is proportional to this probability (as it depends on demographic data and model, and is independent on genetic data and model). If the individuals have not coalesced at a more recent generation, the probability that two individuals coalesce at generation t C = t ( In [ k ]) is given by the scalar product of their probability distributions at generation t C , multiplied by the parameter (since is independent of generation time): The parameter θ α will be estimated as a coefficient related to the average effective population size N e . The probability that they have not coalesced more recently is given by Equation ?? : The final probablity of coalescence is : The allele probability distribution vector of the coalescent ancestor In [ k ] is given by: Where ∏ ⊙ is the element-wise vector multiplication. We can calculate the probability of a data sample ( P G ( S ) or S G ) and genealogy H C , given the genetic model θ G , by multiplying the probabilities from Equation ( ?? ) over coalescence events and updating the probability distribution of nodes across the genetic space using the corresponding equation: Algorithm 2 Genetic Probability of a Demographically Simulated Coalescent Download figure Open in new tab Note that this algorithm 2 can be combined with the demographic coalescence simulation algorithm (Algorithm 1) so that the coalescence simulation yields directly the genetic probability of the demographic coalescent. Algorithm 3: Joint simulation of coalescent on population graph and calculation of the probablity on genetic graph Set generation time t = {max t | card( An ( S, t )) ≥ 2}. Set P G = 1 Calculate genetic distribution of P P ( S, t ) ( eq. 3 ). Select randomly a pair of lineage in the set An ( S, t ) that remain. Simulate their coalescence or not at t − 1 with probability defined in eq. 5 . if coalescence occurred, merge the lineages, update demographic distribution using eq. 6 . Record the event in a genealogy object including the probablity distribution location of each remaining lineage. Reset current P G multiplying it by the pairwise coalescence probability of this coalescence event defined in ( equation 10 ). Set the demic and allelic distribution probabilities of V C [ i ] acording to equation (11). go to 3. until every pair of the set has been tested for coalescence. Set t = t − 1. go to 2. Until all lineages have coalesced Algorithm 3 Joint Simulation of Coalescent on Population Graph and Calculation of Probability on Genetic Graph Download figure Open in new tab Simulation of genealogy knowing genetic model The second method of likelihood calculation consists of simulating a genealogy of the sample within the genetic graph and then evaluating its probability in the population graph. We again consider coalescence events from the most recent ancestor to the common ancestor, proceeding in pairs of lineages. The same equations, namely Equation (2), Equation (3), and Equation (4), can be used to calculate the probability of transition from the genetic distribution at time t to time t − 1 ( Equation 13 ), the general expression of the genetic distribution at any time t ( Equation 14 ), and the probability that two genes, which have not coalesced more recently, share the same genetic state at ancestral time t ( Equation 15 ), respectively. The probability that two lineages coalesce in the previous generation, t − 1, is obtained by multiplying the vector of coexistence probability in genetic space by a parameter ,This parameter characterizes the probability of coalescence for individuals sharing alleles. It reflects the average effective population size, which is independent of the other θ G parameters and P G ( S ) and, therefore, remains constant. However, this parameter is unknown and must be estimated. If they coalesce, the genetic distribution of the ancestor knowing genetic model model is given by elementwise multiplication of the distribution probability of the two lineages divided by the probability of coalescence ( eq. 16 ). We can simplify by and obtain: If coalescence occurs, the genetic distribution of the ancestor, given the genetic model, is obtained by performing an element-wise multiplication of the probability distributions of the two lineages and normalizing by the probability of coalescence ( Equation 16 ). Simplifying by ,we obtain: Using these equations for genetic distribution and coalescence probability from one generation to the parent, we can simulate their coalescence using the following algorithm. Algorithm 4 Simulation of the genealogy given genetic graph and data Download figure Open in new tab Probability of a genealogy knowing demographic model Let us consider a coalescent graph H C simulated knowing the genetic model. We calculate the probability of the genealogy given the demographic model for each coalescence point p ( In [ k ] | θ P ), characterized by t ( In [ k ]) = t C and its descendants, denoted as In [ k ] d = Adj −1 ( In [ k ]). The number of descendants coalescing in In [ k ] is given by card( In [ k ] d ) = card(Adj −1 ( In [ k ])). The number of descendants can be **2 in case of dichotomy**, or **more in case of polytomy**. These events occur at time t ( In [ k ] d ). If they do not coalesce more recently, the probability that they co-occur in the same genetic state (in the same population) at t (where t ≤ min ( In [ k ] D )) given the demographic model θ P is obtained by computing the scalar product of the probability distributions of each individual at time t , as given by Equation 3 . Let us consider a coalescent graph H C simulated knowing genetic model. We calculate the probability knowing demographic model for each coalescence point p ( In [ k ] | θ P ) characterized by t ( In [ k ]) = t C and its descendants noted In [ k ] d = Adj − 1( In [ k ]). The number of descendants coalescing in In [ k ] is noted card( In [ k ] d ) = card( Adj − 1( In [ k ])). They can be 2 in case of dichotomy, or more in case of polytomy. They occur a times t ( In [ k ] d ) If they do not coalesce more recently, the probability that they co-occur in the same genetic state (in the same population) at t (( t ≤ min In [ k ] D ) ) knowing demographic model θ P is given by the scalar product of the probability distributions of each individual at time t (given by eq. 3 ). To obtain the probability that they coalesce at time t , we divide for each deme the probability of coexistence by the effective population size of each deme before computing the same scalar product: We now consider the probability that they **did not coalesce** more recently than time t C : Then, the probability that the descendants In [ k ] d coalesce at time t C = t ( In [ k ]) (or the probability of In [ k ]) is: The allele probability distribution of coalescent ancestors as is : Where ⊙ is the elementwise multiplication operator As we presented before for the probability of a genealogy knowing genetic data and model, the probability of a genealogy knowing population data and model is obtained by multiplying the probabilities of equation (22) over coalescence events and updating the probability distribution of coalescent ancestors using Equation (23) at each coalescence event: where the demographic probability distributions of the nodes In [ k ], used to calculate p ( In [ k ] | θ P ) using Equation (22), are successively given by Equation (23). The algorithm to calculate the demographic probability of a genetic-simulated genealogy is as follows: Algorithm 5 Calculation of the probability of a coalescent history given a genetic model Download figure Open in new tab This algorithm can be combined with the genetic simulation algorithm so that the coalescence simulation directly yields the demographic probability of the genetic coalescent simulation. Algorithm 6 Joint simulation of coalescence on the genetic graph and probability calculation in the population graph Download figure Open in new tab Likelihood The likelihood function is not analytically tractable. The coalescent is considered as latent data that can be simulated from one component of the metamodel, and its probability can be calculated using the other component. If we simulate the coalescence graph from demographic data (denoted as ) and calculate the likelihood from genetic data, we obtain: Reciprocally if we simulate coalescence graph from genetic data (we note this graph ) and calculate likelihood from demographic data: The likelihood can be estimated using a Monte Carlo algorithm, by simulating from demographic data: or from genetic data. Inference The Monte Carlo estimated likelihood can be used in Bayesian inference or maximum likelihood estimation. For the latter, and in such a process divided into an underlying process that cannot be directly observed (in our case, the coalescent) and a sampling model (in our case, the probability of the data given the coalescent), Park [ 15 ] developed a meta-model assuming a Gaussian distribution of the log-likelihood, which allows for obtaining maximum likelihood statistics.— Grouping generations for computational tractability At each generation, genes migrate across demographic and genetic space, eventually coalescing when they coexist in the same demographic group (population) and genetic group (allele). However, these events occur with low probabilities, making direct simulation computationally expensive. To reduce computation time, we can raise the transition matrix to a power, allowing for faster simulation and genealogy probability calculations. Since information is extracted from the joint genetic and demographic distribution of the species, the effective population size Ne i can be averaged within a deme over a time period corresponding to the mutation timescale (typically more than 10 4 generations for most genetic markers). If the environment is changing, the potential effective population size Ne i should be approximated using the harmonic mean of potential effective sizes over that period. To determine an appropriate time-scaling factor, simulations should be conducted while accounting for population size, migration rates, and mutation rates. Discussion In this paper, I propose a method to efficiently calculate a metamodel likelihood function for estimating genetic parameters (such as mutation rates) and environmental demographic parameters (such as the relationships between demogenetic factors—effective migration and effective population size—and socialecological environmental variables) from population genetic data and measurable social-ecological history variables. This work represents the first full integration of fundamental niche processes and realized niche processes related to historical movement in demogenetics. Additionally, it introduces the first likelihood-based approach in environmental demogenetics, opening pathways for maximum likelihood and exact Bayesian inference. Demogenetic models are inherently complex, and integrating niche and historical processes adds further challenges. Likelihood-based inference has been restricted to simple coalescence models where the likelihood function is tractable. To address the computational challenges of complex “real-life” demogenetic models, Approximate Bayesian Computation (ABC) was introduced [ 16 ] and has become the primary approach for spatial demogenetic modeling [ 17 ]. Yet, ABC-based inference relies on summary statistics, whose selection is ambiguous [ 14 , 18 ], and where acceptance rates decrease with an increasing number of statistics, making estimator consistency difficult to maintain [ 18 , 19 ]. Instead, we employ direct likelihood-based inference. To reduce computational burden, we integrate the likelihood calculation within the simulation process—either incorporating genetic probability calculations into demographic simulations or vice versa. This approach can be further optimized by grouping demographic generations using a population transition matrix at time scales comparable to mutation time scales. Studies must be performed to determine the identifiability of demographic parameters from genetic distributions. Since effective population size depends significantly on fluctuations, the rate of recovery may provide signals on population structure [ 20 ]. An exhaustive model may incorporate growth and carrying capacity parameters as functions of environmental data. Alternatively, to reduce computational burden we may assume a constant intrinsic growth rate ( R ) while allowing the carrying capacity ( K ) to depend on environmental data. Finally, a further simplification can be made by assuming that the species always maintains its effective population size at the carrying capacity. From a population genetics perspective, genetic structure was historically related to simple drift, migration, mutation, and selection—forces model. With the advance of genetic sequencing and computation technologies, theses later forces were progressively linked to complex landscapes [ 21 ]. Demogenetics has emerged as a field to infer historical demography models from genetic data [ 17 ]. The integration of demogenetics with environmental niche models, termed iDDC (integrated Distribution, Demographic, and Coalescent modeling) [ 6 ], has been attempted. However, previous efforts primarily coupled independent distribution, demographic, and coalescent models rather than forming a truly integrated framework. The novel approach we propose jointly infers niche and dispersal parameters within a single comprehensive model. In this framework, the niche model predicts effective population size and migration, the key variables of interest in population genetics. From an ecological perspective, modern studies increasingly combine biogeography, paleontology, genetics, and ecological modeling to explain species distributions [ 22 ]. Species presence is determined by a complex interplay of historical constraints (evolutionary history, dispersal, past climate) and current ecological conditions (abiotic and biotic factors). Predicting the realized niche—the fundamental goal of ecology—requires considering fundamental niche constraints, species interactions, historical dispersal, and adaptation. Our approach improves prediction by incorporating genealogical factors and dispersal constraints into distribution modeling using molecular genetic data. Traditional species distribution models infer niche parameters from occurrence data, but this inference is biased because distribution data reflects not only niche constraints but also dispersal limitations and historical processes. By integrating niche inference with genealogical and dispersal models, we can better distinguish deterministic and stochastic processes underlying species occurrence. This integration removes biases in niche parameter estimation: in predicting effective population size, we account for coalescent-based probabilities of species presence. Although environmental niche potential is a necessary but not sufficient condition for species presence, our coalescent-based approach helps validate whether this niche was realized as predicted by migration models. This integration of dispersal and niche processes could also improve forecasting of future distributions under environmental change scenarios, including climate and land-use shifts. A key limitation of our model is that it does not yet account for species interactions, niche evolution, or adaptation. We assume that the relationship between species density and environmental variables remains constant over time. However, since our niche models are inferred through genealogical processes, they may capture niche range across evolution in the niche model. Social-ecological data could incorporate anthropological and biotic factors beyond abiotic constraints, enabling a more comprehensive ecological modeling framework. A natural next step would be to infer multiple species’ demogenetic models simultaneously, allowing for better representation of species interactions. We present a method to efficiently compute a likelihood function for any social-ecological demogenetic model that can be represented as a connected graph. This advancement enhances the integration of ecology and genetics, leveraging genetic and environmental data to infer population demographic scenarios. Our contributions include: The first likelihood-based inference method for demogenetic models in heterogeneous landscapes, previously limited to ABC approaches. A method that directly infers niche parameters rather than merely mapping demographic parameters, overcoming previous limitations. An algorithm capable of modeling diverse social and ecological network structures (spatial grids, social groups, ecological interactions), broadening the applicability of genetic inference models. This algorithm is currently being implemented in the R library graphPOP [ 23 ]. The availability of large genetic datasets—particularly for agricultural species, pests, diseases, and endangered species—combined with hypotheses on social-ecological drivers of genetic variation, presents a significant opportunity. Our method has the potential to enhance population genetics as a tool for biodiversity and epidemiology studies in agriculture ecology and conservation by enabling more precise demographic and ecological inferences. By fully integrating potential and realized niches within a genealogical framework, and considering that genetic data, in this respect, contain more information on ecological parameters than simple occurrence data, this approach enables a more accurate understanding of species distributions and their future projections. Acknowledgments This work has been supported by IRD EGCE research unit project and BASC labex. I thank to Camille Coron and LMO Orsay France Laboratory, and Arnaud Becheler and Lacey Knowles laboratory members at of Ecology and evolutionary Biology department of Michigan Sate University for fruit full discussions. Footnotes https://github.com/stdupas/GraphPOP References 1. ↵ Barve N , Barve V , Jiménez-Valverde A , Lira-Noriega A , Maher SP , Peterson aT , et al. The crucial role of the accessible area in ecological niche modeling and species distribution modeling . Ecological Modelling . 2011 ; 222 ( 11 ): 1810 – 1819 . doi: 10.1016/j.ecolmodel.2011.02.011 . OpenUrl CrossRef Web of Science 2. ↵ Matos-Maraví P. An “omics” approach to bridge community ecology and island biogeography . Molecular Ecology . 2020 ; 29 ( 9 ): 1592 – 1595 . doi: 10.1111/MEC.15426 . OpenUrl CrossRef 3. ↵ Gotelli NJ , Stanton-Geddes J. Climate change, genetic markers and species distribution modelling . Journal of Biogeography . 2015 ; 42 ( 9 ): 1577 – 1585 . doi: 10.1111/jbi.12562 . OpenUrl CrossRef 4. ↵ Fordham DA , Brook BW , Moritz C , Nogués-Bravo D. Better forecasts of range dynamics using genetic data . Trends in Ecology & Evolution . 2014 ; 29 ( 8 ): 436 – 443 . doi: 10.1016/j.tree.2014.05.007 . OpenUrl CrossRef PubMed 5. ↵ Naughtin SR , Castilla AR , Smith AB , Strand AE , Dawson A , Hoban S , et al. Integrating genomic data and simulations to evaluate alternative species distribution models and improve predictions of glacial refugia and future responses to climate change . Ecography . 2024 ; p. e07196 . doi: 10.1111/ecog.07196 . OpenUrl CrossRef 6. ↵ He Q , Edwards DL , Knowles LL . INTEGRATIVE TESTING OF HOW ENVIRONMENTS FROM THE PAST TO THE PRESENT SHAPE GENETIC STRUCTURE ACROSS LANDSCAPES . Evolution . 2013 ; 67 ( 12 ): 3386 – 3402 . doi: 10.1111/evo.12159 . OpenUrl CrossRef PubMed 7. ↵ Currat M , Ray N , al E. SPLATCHE: a program to simulate genetic diversity taking into account environmental heterogeneity . Molecular Ecology Notes . 2004 ; 4 : 139 – 142 . OpenUrl CrossRef 8. Rebaudo F , Le Rouzic A , Dupas S , Silvain J , Harry M , Dangles O. SimAdapt: an individual-based genetic model for simulating landscape management impacts on populations . Methods in Ecology and Evolution . 2013 ; 4 ( 6 ): 595 – 600 . doi: 10.1111/2041-210x.12041 . OpenUrl CrossRef 9. ↵ Landguth EL , Bearlin A , Day CC , Dunham J. CDMetaPOP: an individual-based, eco-evolutionary model for spatially explicit simulation of landscape demogenetics . Methods in Ecology and Evolution . 2017 ; 8 ( 1 ): 4 – 11 . doi: 10.1111/2041-210x.12608 . OpenUrl CrossRef 10. ↵ Yannic G , Hagen O , Leugger F , Karger DN , Pellissier L. Harnessing paleo-environmental modeling and genetic data to predict intraspecific genetic structure . Evolutionary Applications . 2020 ; 13 ( 6 ): 1526 – 1542 . doi: 10.1111/eva.12986 . OpenUrl CrossRef PubMed 11. ↵ Ray N , Currat M , Foll M , Excoffier L. SPLATCHE2: a spatially explicit simulation framework for complex demography, genetic admixture and recombination . Bioinformatics (Oxford, England) . 2010 ; 26 ( 23 ): 2993 – 4 . doi: 10.1093/bioinformatics/btq579 . OpenUrl CrossRef PubMed Web of Science 12. ↵ Currat M , Arenas M , Quilodr an CS , Excoffier L , Ray N. SPLATCHE3: simulation of serial genetic data under spatially explicit evolutionary scenarios including long-distance dispersal . Bioinformatics . 2019 ; 35 ( 21 ): 4480 – 4483 . doi: 10.1093/bioinformatics/btz311 . OpenUrl CrossRef PubMed 13. ↵ Becheler A , Coron C , Dupas S. Quetzal - an open source C++ template library for coalescence-based environmental demogenetic models inference . bioRxiv . 2017 ; p. 1–27. doi: 10.1101/214767 . OpenUrl Abstract / FREE Full Text 14. ↵ De Visscher L , De Baets B , Baetens JM . A critical review of common pitfalls and guidelines to effectively infer parameters of agent-based models using Approximate Bayesian Computation . Environmental Modelling & Software . 2024 ; 172 : 105905 . doi: 10.1016/j.envsoft.2023.105905 . OpenUrl CrossRef 15. ↵ Park J. Scalable simulation-based inference for implicitly defined models using a metamodel for Monte Carlo log-likelihood estimator ; 2024 . Available from: http://arxiv.org/abs/2311.09446 . 16. ↵ Pritchard JK , Seielstad MT , Perez-Lezaun A , Feldman MW . Population growth of human Y chromosomes: a study of Y chromosome microsatellites . Molecular Biology and Evolution . 1999 ; 16 ( 12 ): 1791 – 1798 . doi: 10.1093/oxfordjournals.molbev.a026091 . OpenUrl CrossRef PubMed Web of Science 17. ↵ Csilléry K , Blum MGB , Gaggiotti OE , François O. Approximate Bayesian Computation (ABC) in practice . Trends in Ecology & Evolution . 2010 ; 25 ( 7 ): 410 – 418 . doi: 10.1016/j.tree.2010.04.001 . OpenUrl CrossRef PubMed Web of Science 18. ↵ Karabatsos G , Leisen F. An Approximate Likelihood Perspective on ABC Methods ; 2018 . Available from: http://arxiv.org/abs/1708.05341 . 19. ↵ Nakagome S , Fukumizu K , Mano S. Kernel Approximate Bayesian Computation for Population Genetic Inferences ; 2013 . Available from: https://arxiv.org/abs/1205.3246 . 20. ↵ Crosato E , Philippson JN , Thutupalli S , Morris RG . Dynamical demographic phases explain how population growth and mutation control the evolutionary impact of bottlenecks . Physical Review Research . 2023 ; 5 ( 1 ): 013093 . doi: 10.1103/PhysRevResearch.5.013093 . OpenUrl CrossRef 21. ↵ Storfer A , Murphy MA , Spear SF , Holderegger R , Waits LP . Landscape genetics: where are we now? Molecular Ecology . 2010 ; 19 ( 17 ): 3496 – 3514 . doi: 10.1111/j.1365-294X.2010.04691.x . OpenUrl CrossRef PubMed Web of Science 22. ↵ Morales-Castilla I , Davies TJ , Pearse WD , Peres-Neto PR . Combining phylogeny and co-occurrence to improve single species distribution models . Global Ecology and Biogeography . 2017 ; 26 : 740 – 752 . doi: 10.1111/geb.12580 . OpenUrl CrossRef 23. ↵ Patarroyo C , Dupas S. graphPOP ; 2024 . Available from: https://github.com/stdupas/GraphPOP . View the discussion thread. Back to top Previous Next Posted March 12, 2025. Download PDF Data/Code Email Thank you for your interest in spreading the word about bioRxiv. NOTE: Your email address is requested solely to identify you as the sender of this article. Your Email * Your Name * Send To * Enter multiple addresses on separate lines or separate them with commas. You are going to email the following Likelihood of social-ecological genetic model Message Subject (Your Name) has forwarded a page to you from bioRxiv Message Body (Your Name) thought you would like to see this page from the bioRxiv website. Your Personal Message CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions. Share Likelihood of social-ecological genetic model Stéphane Dupas , Camilo Patarroyo bioRxiv 2025.03.06.641298; doi: https://doi.org/10.1101/2025.03.06.641298 Share This Article: Copy Citation Tools Likelihood of social-ecological genetic model Stéphane Dupas , Camilo Patarroyo bioRxiv 2025.03.06.641298; doi: https://doi.org/10.1101/2025.03.06.641298 Citation Manager Formats BibTeX Bookends EasyBib EndNote (tagged) EndNote 8 (xml) Medlars Mendeley Papers RefWorks Tagged Ref Manager RIS Zotero Tweet Widget Facebook Like Google Plus One Subject Area Bioinformatics Subject Areas All Articles Animal Behavior and Cognition (7635) Biochemistry (17691) Bioengineering (13892) Bioinformatics (41937) Biophysics (21452) Cancer Biology (18588) Cell Biology (25504) Clinical Trials (138) Developmental Biology (13378) Ecology (19899) Epidemiology (2067) Evolutionary Biology (24320) Genetics (15609) Genomics (22506) Immunology (17736) Microbiology (40394) Molecular Biology (17181) Neuroscience (88605) Paleontology (666) Pathology (2832) Pharmacology and Toxicology (4824) Physiology (7641) Plant Biology (15156) Scientific Communication and Education (2045) Synthetic Biology (4294) Systems Biology (9825) Zoology (2271)

Text is read by the "Ask this paper" AI Q&A widget below. Extraction quality varies by source — PMC NXML preserves structure cleanly, OA-HTML may include some navigation residue, and OA-PDF can have broken hyphenation. The publisher copy (via DOI) is the canonical version.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2025) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00
unpaywall
last seen: 2026-05-26T02:00:01.498150+00:00
License: CC-BY-4.0