BACKGROUND
complex diseases  are caused by variations in multiple loci interacting with each other and with environmental factors  <cit> .
many complex traits, such as cancer, heart disease, obesity, diabetes, and many common psychiatric and neurological conditions, have large prevalence and mortality among human diseases  <cit> .
the concept of gene-environment interaction  is theoretically central in cd  <cit> .
it is widely accepted that gxe must be considered in cd to avoid a serious underestimation of the disease risk and inconsistencies of replication among different studies.
furthermore, taking into account the gxe could focus medical intervention by identifying sub-groups of individuals who are more susceptible to specific environmental exposures  <cit> .
however, there are very few examples of well described gxe in scientific literature  <cit> .
instead, a large amount of information has been collected about both single genetic and environmental risk factors individually taken, because the majority of the studies examined the main effect of single factors instead of examining the interactions  <cit> .
in our opinion, one reason for such a failure could be the statistical approach.
several statistical methods aimed at the identification of factors' interactions have been described and used to identify gxe, such as logistic regression  <cit>  and multifactor dimensionality reduction   <cit> .
however, the performances of these methods can be influenced by many variables such as the sample size, the number of involved factors, the type of interaction, the model of inheritance, the allelic frequencies, the distributions of the environmental factors, and the relative strength of the different factors affecting the risk of disease.
unfortunately, only some of these characteristics are known in few real populations, and therefore there is not enough information to assess the performances of statistical methods.
in this scenario, as an alternative approach, one can imagine using simulated populations in order to assess the statistical power of different methods.
in population genetics, although there are several genetic data simulators , the vast majority have been developed to study the evolution of genomic sequences across generations .
beside these tools, many others that simulate pedigrees also have been developed.
they help the linkage analysis in familiar pedigrees and, hence, are useful mainly in mapping loci involved in mendelian diseases  <cit> .
regarding the modelling of the genetics role in common multifactorial complex diseases, to date, few models have been developed.
the "gwasimulator" was developed mainly to simulate pattern of linkage disequilibrium  among snps in genome-wide studies  <cit> .
gwasimulator does not consider any role of the environment on the risk of disease.
on the contrary, the modelling of environmental factors effect on the risk of disease is a very large field of epidemiology  <cit> .
however, it is generally accepted that the effect of an environmental exposure on the disease risk can follow a logistic function.
indeed, the most used statistical tool for environmental factor is the logistic regression.
among the others, two software, simla  <cit>  and quanto  <cit>  are specifically designed for data sets where the disease risk is a function of interactions between genetic and environmental factors.
in both models, the disease risk is based on a logistic function, where covariates are genetic factors, environmental factors and interactions.
in simla the data of three generations of families are simulated and the disease risk is a function of up to two genetic and two environmental factors.
the user can input the relative risk associated to single factors and also combinations of any two factors.
quanto is a tool designed to estimate the power of matched case-control, case-sib, or case-parent studies and does not actually produce simulated data sets.
in quanto the disease risk is a function of a one gene-one environment interaction.
moreover, in quanto the user can input the risks associated to the environmental factor, to the genetic factor and to their interaction.
simla and quanto are valuable tools for the modelling of complex diseases, because they explicitly consider the role of gxe in disease risk.
however, some limitations still exist.
for example, in simla it is not straightforward to simulate data of unrelated individuals as those of case-control data sets.
furthermore, the user inputs the risk associated to each factor and to each interaction of factors.
in this way, after the building up of the logistic model the marginal risks that result for each single factor are not the same as those input previously.
this latter can be a limitation when simulating a real dataset where only marginal risks of single factors are known, and nothing known about their relationships.
finally, these tools can describe the interactions between genetic and environmental factors only in a linear way and they are not easily extensible to more complex interactions.
we propose a novel method, the multi-logistic model, that mathematically describes gene-environment interactions that are similar to those found in case-control studies.
by this method it is possible to model gxe in any form, involving any number of genetic and environmental factors, also allowing gene-gene interactions, as epistasis.
a simple version has been implemented in the gene-environment interaction simulator , designed to simulate case-control data sets where a one gene-one environment interaction influences the disease risk.
moreover, to make easier the simulation of data nearer to those from previous studies or literature we used common epidemiological measures as input.
this also makes the tool friendlier to the biomedical community.
RESULTS
the multi-logistic model for gene-environment interaction
the mathematical approach behind the simulation of the disease risk involving gxe is based on a system of logistic relationships.
we called this approach multi-logistic model  and specifically designed it to describe disease risk in data sets that simulate case-control samples.
in the simulated data sets, each individual has g genetic factors and is exposed to e environmental factors.
genetic factors are denoted by  where a =  <dig>  ..., g. the genetic factors are biallelic single nucleotide polymorphisms which result in three diploid genotypes, namely the first homozygote , the heterozygote  and the second homozygote .
genetic frequencies for each factor are denoted by pg() where ∀a .
the environmental variables, instead, are denoted by , where b =  <dig>  ..., e and jb is an index which runs over the possible discretized values of the variable b. they are characterized by exposure probabilities denoted by pe() .
it is worth noticing we preferred to present the mathematical description concerning a discrete environmental variable only in order to keep it simpler.
however, the model is more general and can be referred to as both continuous or discrete variables.
let us consider a particular individual characterized by  values of  and .
in general the disease risk r is a function of all of them.
the disease risk for such an individual () is defined by the conditioned probability
where p  is the probability of the individual to be affected.
in our model we assume a logistic expression for r:
where  and  are free parameters determined by the genetic factors and governing the shape of the function.
figure  <dig> shows an example of the model in case of  <dig> genetic and  <dig> environmental factor interacting.
gene-environment interaction simulator
we implemented the mlm in the gene-environment interaction simulator .
for the sake of simplicity we describe, in this phase, a simple interaction between one genetic and one environmental factor even though we continue to describe an individual by assigning to him a -tuple of characteristics.
as a consequence of this choice, the mlm gets a simpler form.
in particular, we can drop the indexes a and b in the expression of disease risk .
thus, by denoting with gi the genotype of the chosen gene and with xj the exposure level of the environmental factor involved, we have
in other words, the mlm reduces to three logistic functions, one for each genotype.
it is possible to think of αi as the basal genetic disease risk in individuals with that genotype.
the greater is αi the stronger is the disease risk, independently of the contribution of the environmental factor.
in particular, for vanishing αi there is no basal risk and the risk is totally ascribed to the environmental exposure .
analogously, βi represents the coefficient associated to the environmental exposure, thus the greater is βi the greater risk is associated to an increasement in the environmental exposure.
in other words, βi models, for genotype i, the susceptibility to the environmental factor exposure.
consequently, for vanishing βi the environmental exposure has no effect on the disease risk.
to describe populations by standard epidemiological measures, we implied the relative risk as the measure of the role of a genetic factor on the disease risk.
in particular, by defining the total risk  in a specific genotype i as
one can define the relative risk rrkl ≡ t rk/t rl.
we take one homozygote as a reference point , the other homozygote  has an equal or larger risk than the first one, and the heterozygote  has a risk ranging within the two homozygotes.
furthermore, we assume the relative risk of heterozygote to be within those of the two homozygotes .
in particular, if the heterozygote risk is the same of the first homozygote a recessive effect is simulated.
if the heterozygote has the same risk of the second homozygote a dominant effect is simulated.
other situations are called co-dominant.
formally, the relative risk of heterozygote rr <dig> is defined as
where the w allows to model various inheritance effects: recessive , dominant , and co-dominant   <cit> .
marginal risk of the environmental factor is input as the odds ratio of the increase of one unit in the level of exposure.
this value is then transformed in the coefficients βi of the multi-logistic model.
anyway, at most only one βi is provided by the user, leaving the tool deriving other values to respect all the constraints.
type of gxe interaction
to describe the gxe in biological understandable terms, we consider a genetic only and an environmental only model and two models of interactions that involve both genetic and environmental factors .
the first two models could be useful as reference.
type of gene-environment interactions are expressed as constraints among coefficients of the multi-logistic model.
this approach allows to specify the type of interaction to simulate in a simple manner.
another interesting consequence is that for each type of interaction only a subset of coefficients needs to be specified.
in the first model, the genetic model , each individual carrying a genotype has the same disease risk regardless of the environmental exposure.
this situation is modelled by giving a vanishing effect to the environmental variable, namely fixing all the βi equal to zero.
in the second model, the environmental model , the risk is due to the environmental exposure only.
this situation is modelled by imposing αi and βi equal across the genotypes with a non-vanishing βi.
this choice provides the same risk independently of the carried genotype.
the third model simulates the scenario where the gene modules response to environment .
in this case the genetics do not directly affect the disease risk, but modules the response to the environmental exposure.
in other words, some genotypes are more prone than others to develop the disease if exposed to the same environmental level.
in this interaction model all the αi are equal  while βi are different.
the last is the additive model , where genetic and the environment influence the risk directly, independently and additively.
moreover the environmental exposure has the same effect in all the genotypes .
for this model, there are no complex interactions between the genetics and the environmental exposure.
however, the risk is the sum of that due to the genetic predisposition and that due to the environmental role.
of course the user can create further types of gxe by freely imposing αi and βi.
knowledge-aided parametrization system
to translate the population parameters into coefficients of the mlm, we implemented the knowledge-aided parametrization system .
this module derives the values of αi and βi starting from genotype frequencies, relative risk and model of inheritance of the genetic factor, distribution and odds ratio of the environmental factor, type of gxe and the proportion of affected individuals in the sample .
the key issue is that the overall disease frequency in the population m is given by
dividing eq.
<dig> by t r <dig> and by means of some algebraic manipulation, it is straightforward to show that
in a similar way it is possible to derive the expressions for the marginal risks of the other genotypes.
by numerically solving this set of three equations  it is possible to obtain ai and βi coefficients that match at most the user's requests.
algorithm and implementation
the simulation procedure is divided into several steps .
first of all, the genotypes of g genetic factors and the levels of exposure of e environmental factors are assigned to the n individuals.
consequently, the sample population characteristics  are input by the user and hence the coefficients of the mlm are calculated.
finally, the disease risk and the disease status are assigned to each individual.
concerning the genetic factors, the user can provide the allelic frequencies or allow the simulator to randomly select them .
in both cases, the hardy-weinberg's law is used for the calculation of the frequencies of the genotypes.
afterwards, by means of a monte carlo method, the genotype of each genetic factor is randomly assigned to each individual according to the genotypic frequencies.
similarly for the environmental factors, the user can use a distribution function, among a set of predefined ones, or provide an empirical distribution pe().
again by a monte carlo process the exposures of environmental factors are assigned according to distribution functions.
after the assignment of the genetic and environmental factors to individuals, the next step is the assignment of the phenotype.
for this process the system computes the coefficients of the mlm in order to create the relationship between population characteristics, type of gxe interaction, and disease risk.
the actual computation of the coefficients is performed by kaps that, by means of eq.
<dig> and similar ones for t r <dig> and t r <dig>  solves numerically the resulting system of three equations and returns α <dig>  α <dig>  α <dig>  β <dig>  β <dig> and β <dig>
the disease risk  ≤ 1) is assigned by the mlm  by using the parameters previously identified.
in particular, for each individual his genotype i establishes the coefficients αi and βi computed by kaps, while the exposure level is the value of the covariate xj.
the last step is to assign a disease status  to the individuals.
again by a monte carlo process, the system generates a random number with uniform distribution in  <cit>  and assigns to the individual the status  <dig>  if this number is less then his risk r, or  <dig>  if otherwise.
an implementation of gens is freely available on sourceforge https://sourceforge.net/projects/gensim as a set of matlab  <dig>  scripts that can be freely modified to address different requirements .
discussion and
CONCLUSIONS
in this article we present a novel mathematical approach to model gxe in complex diseases.
this approach is based on a multi-logistic model  and it is specifically tailored to model disease risk in data set that simulates case-control samples.
we implemented this method in gene-environment interaction simulator , a tool designed to yield case-control samples for gxe.
these tools could be useful to generate simulated data sets in order to assess the performances of statistical methods.
the necessity to provide simulated populations is due to the difficulty of obtaining real populations in which enough parameters are known to be related to the phenotype.
furthermore, during the design of a statistical study, simulated populations can also be used to estimate the expected statistical power when assuming different types of gxe  <cit> .
we focused on inputing characteristics extracted by real populations .
in this way it is also easy to replicate real populations and evaluate the change of statistical power due to changes of the parameters as the sample size  and the disease frequency  and the type of gxe and etc.
the key idea underlying the mlm is the modelling of the disease risk in each combination of genetic factors  as a different mathematical function of the environmental exposures .
in this way it is possible to model any type of interaction between genetic and environmental factors, also complex and non-linear ones.
we based our approach on the logistic function.
this function is widely used in epidemiological studies and has several advantages.
it follows the weber-fechner law and as the value of the risk factor increases it naturally ranges from  <dig> to  <dig>  <cit> .
moreover, the coefficients of the covariates correspond to the logarithm of the odds ratio due to a one-unit increase   <cit> .
in particular, in order to calculate the disease risk, the genetic factors of individuals sets coefficients of the function while the environmental factors assign a value to its covariates.
we implemented the mlm in the gene-environment interaction simulator, a gxe simulator for case-control studies.
the intended audience of gens is the biomedical community, thus the main efforts have been to describe populations by standard epidemiological measures, to implement constraints to make the simulator behaviour biologically meaningful, and to define the gxe in biological understandable terms.
in theory, the mlm can model interactions of multi-genetic and multi-environmental factors.
however, for the sake of simplicity we focused on an interaction between one genetic and one environmental factor.
in this way it is much easier to use as input standard epidemiological measures.
nevertheless, even in this simple situation, the handling of the interaction is not straightforward.
furthermore, in simulated populations besides the involved factors there are other ones that act as noisy background, as frequently occurs in real data sets.
even in this simple scenario, modelling the desired characteristics of a population can be very difficult, except for some particular and simple cases, mainly because it is necessary to provide several coefficients to the mathematical model.
however, having several coefficients with a difficult interpretation is a common pitfall when modelling complex interactions.
therefore, to overcome this limitation we have implemented the knowledge-aided parametrization subsystem .
this system exploits a set of reasonable biological constraints to reduce the complexity of the system.
first of all, concerning the genetic factors, we imposed that the risk assigned to the heterozygote falls between the two homozygotes.
secondly, we adopted a qualitative description of the gxe.
in particular, each type of gxe can be modelled as a set of equality and inequality of αi and βi among genotypes.
we pre-determined two types of gxe, an additive  and a modulative type .
the user has only to select which type of gxe must be simulated, without providing additional information.
in this way, we can reduce the complexity of the system and, therefore, reduce the degrees of freedom of the mathematical model.
finally, kaps solves the system of equations to derive coefficients in order to comply with both biological constraints and population characteristics imposed by the user.
as a consequence, to simulate a population only classical epidemiological parameters have to be provided .
however, the user can simulate any kind of interaction by the freedom of inputing all the coefficients of the mlm, and even to substitute the logistic expression with a different one.
in population genetics, data simulation has been mainly used to study population evolution, linkage disequilibrium, and pedigree of mendelian disease  <cit> .
although some very interesting tools have been specifically designed for complex diseases  <cit> , some limitations still exist.
for example they do not directly produce case-control data sets.
gens is specifically designed to produce case-control data sets as close as possible to real ones in a simple manner.
in addition, differently from a naive logistic model, the mlm allows modelling non-liner phenomena such as epistasis.
one of the shortcomings of gens compared to other tools could be the limitation of one gene-one environment interactions.
however, this choice has been made because it is easier to describe and understand the joint and single role of the factors.
it should be noted that this limitation accounts mainly to the present implementation, in particular to kaps.
in fact, the multi-logistic model can be easily used to simulate multi genetic-multi environmental factor interactions by applying eq.
<dig> and providing enough coefficients.
the number of environmental factors are increased by adding additional covariates in the functions to consider their effects.
instead, the number of genetic factors involved in the disease risk is increased by defining additional logistic functions in the multi-logistic model.
for example, with the software a file is provided containing parameters of a non-linear interaction among three genetic and two environmental factors.
furthermore, the multi-logistic model can be extended to use different functions for each combination of genetic factors.
as our approach is widely based on a monte carlo process, the system naturally takes into account the randomness present in any real data sets obeying to probabilistic laws.
in other words, data sets created with the same characteristic results to be randomly different.
in conclusion, by the multi-logistic model and gens it is possible to simulate case-control samples of complex diseases where gene-environment interactions influence the disease risk.
the user has full control of the main characteristics of the simulated populations and the monte carlo process allows random variability.
a knowledge-based approach reduces the complexity of the mathematical model by using reasonable biological constraints and makes the simulation more understandable in biological terms.
simulated data sets can be used for the assessment of novel statistical methods or for the evaluation of statistical power when designing a study.
authors' contributions
ra, mp and gm conceived and developed the model.
ra, dda and gr implemented the scripts.
mp and sc curated the biological aspect.
gm, mn, gr and sc participated in the design and coordination of the overall study, and drafted the manuscript.
all authors read and approved the final manuscript.

 complex diseases are caused by variations in multiple loci interacting with each other and with environmental factors. many complex traits, such as cancer, heart disease, obesity, diabetes, and many common psychiatric and neurological conditions, have large prevalence and mortality among human diseases. the concept of gene-environment interaction is theoretically central in cd. it is widely accepted that gxe must be considered in cd to avoid a serious underestimation of the disease risk and inconsistencies of replication among different studies. furthermore, taking into account the gxe could focus medical intervention by identifying sub-groups of individuals who are more susceptible to specific environmental exposures. however, there are very few examples of well described gxe in scientific literature. instead, a large amount of information has been collected about both single genetic and environmental risk factors individually taken, because the majority of the studies examined the main effect of single factors instead of examining the interactions. in our opinion, one reason for such a failure could be the statistical approach. several statistical methods aimed at the identification of factors' interactions have been described and used to identify gxe, such as logistic regression and multifactor dimensionality reduction. however, the performances of these methods can be influenced by many variables such as the sample size, the number of involved factors, the type of interaction, the model of inheritance, the allelic frequencies, the distributions of the environmental factors, and the relative strength of the different factors affecting the risk of disease. unfortunately, only some of these characteristics are known in few real populations, and therefore there is not enough information to assess the performances of statistical methods. in this scenario, as an alternative approach, one can imagine using simulated populations in order to assess the statistical power of different methods. in population genetics, although there are several genetic data simulators, the vast majority have been developed to study the evolution of genomic sequences across generations. beside these tools, many others that simulate pedigrees also have been developed. they help the linkage analysis in familiar pedigrees and, hence, are useful mainly in mapping loci involved in mendelian diseases. regarding the modelling of the genetics role in common multifactorial complex diseases, to date, few models have been developed. the "gwasimulator" was developed mainly to simulate pattern of linkage disequilibrium among snps in genome-wide studies. gwasimulator does not consider any role of the environment on the risk of disease. on the contrary, the modelling of environmental factors effect on the risk of disease is a very large field of epidemiology. however, it is generally accepted that the effect of an environmental exposure on the disease risk can follow a logistic function. indeed, the most used statistical tool for environmental factor is the logistic regression. among the others, two software, simla and quanto are specifically designed for data sets where the disease risk is a function of interactions between genetic and environmental factors. in both models, the disease risk is based on a logistic function, where covariates are genetic factors, environmental factors and interactions. in simla the data of three generations of families are simulated and the disease risk is a function of up to two genetic and two environmental factors. the user can input the relative risk associated to single factors and also combinations of any two factors. quanto is a tool designed to estimate the power of matched case-control, case-sib, or case-parent studies and does not actually produce simulated data sets. in quanto the disease risk is a function of a one gene-one environment interaction. moreover, in quanto the user can input the risks associated to the environmental factor, to the genetic factor and to their interaction. simla and quanto are valuable tools for the modelling of complex diseases, because they explicitly consider the role of gxe in disease risk. however, some limitations still exist. for example, in simla it is not straightforward to simulate data of unrelated individuals as those of case-control data sets. furthermore, the user inputs the risk associated to each factor and to each interaction of factors. in this way, after the building up of the logistic model the marginal risks that result for each single factor are not the same as those input previously. this latter can be a limitation when simulating a real dataset where only marginal risks of single factors are known, and nothing known about their relationships. finally, these tools can describe the interactions between genetic and environmental factors only in a linear way and they are not easily extensible to more complex interactions. we propose a novel method, the multi-logistic model, that mathematically describes gene-environment interactions that are similar to those found in case-control studies. by this method it is possible to model gxe in any form, involving any number of genetic and environmental factors, also allowing gene-gene interactions, as epistasis. a simple version has been implemented in the gene-environment interaction simulator, designed to simulate case-control data sets where a one gene-one environment interaction influences the disease risk. moreover, to make easier the simulation of data nearer to those from previous studies or literature we used common epidemiological measures as input. this also makes the tool friendlier to the biomedical community.  the multi-logistic model for gene-environment interaction the mathematical approach behind the simulation of the disease risk involving gxe is based on a system of logistic relationships. we called this approach multi-logistic model and specifically designed it to describe disease risk in data sets that simulate case-control samples. in the simulated data sets, each individual has g genetic factors and is exposed to e environmental factors. genetic factors are denoted by where a =..., g. the genetic factors are biallelic single nucleotide polymorphisms which result in three diploid genotypes, namely the first homozygote, the heterozygote and the second homozygote. genetic frequencies for each factor are denoted by pg() where ∀a. the environmental variables, instead, are denoted by, where b =..., e and jb is an index which runs over the possible discretized values of the variable b. they are characterized by exposure probabilities denoted by pe(). it is worth noticing we preferred to present the mathematical description concerning a discrete environmental variable only in order to keep it simpler. however, the model is more general and can be referred to as both continuous or discrete variables. let us consider a particular individual characterized by values of and. in general the disease risk r is a function of all of them. the disease risk for such an individual () is defined by the conditioned probability where p is the probability of the individual to be affected. in our model we assume a logistic expression for r: where and are free parameters determined by the genetic factors and governing the shape of the function. figure shows an example of the model in case of genetic and environmental factor interacting. gene-environment interaction simulator we implemented the mlm in the gene-environment interaction simulator. for the sake of simplicity we describe, in this phase, a simple interaction between one genetic and one environmental factor even though we continue to describe an individual by assigning to him a -tuple of characteristics. as a consequence of this choice, the mlm gets a simpler form. in particular, we can drop the indexes a and b in the expression of disease risk. thus, by denoting with gi the genotype of the chosen gene and with xj the exposure level of the environmental factor involved, we have in other words, the mlm reduces to three logistic functions, one for each genotype. it is possible to think of αi as the basal genetic disease risk in individuals with that genotype. the greater is αi the stronger is the disease risk, independently of the contribution of the environmental factor. in particular, for vanishing αi there is no basal risk and the risk is totally ascribed to the environmental exposure. analogously, βi represents the coefficient associated to the environmental exposure, thus the greater is βi the greater risk is associated to an increasement in the environmental exposure. in other words, βi models, for genotype i, the susceptibility to the environmental factor exposure. consequently, for vanishing βi the environmental exposure has no effect on the disease risk. to describe populations by standard epidemiological measures, we implied the relative risk as the measure of the role of a genetic factor on the disease risk. in particular, by defining the total risk in a specific genotype i as one can define the relative risk rrkl ≡ t rk/t rl. we take one homozygote as a reference point, the other homozygote has an equal or larger risk than the first one, and the heterozygote has a risk ranging within the two homozygotes. furthermore, we assume the relative risk of heterozygote to be within those of the two homozygotes. in particular, if the heterozygote risk is the same of the first homozygote a recessive effect is simulated. if the heterozygote has the same risk of the second homozygote a dominant effect is simulated. other situations are called co-dominant. formally, the relative risk of heterozygote rr is defined as where the w allows to model various inheritance effects: recessive, dominant, and co-dominant. marginal risk of the environmental factor is input as the odds ratio of the increase of one unit in the level of exposure. this value is then transformed in the coefficients βi of the multi-logistic model. anyway, at most only one βi is provided by the user, leaving the tool deriving other values to respect all the constraints. type of gxe interaction to describe the gxe in biological understandable terms, we consider a genetic only and an environmental only model and two models of interactions that involve both genetic and environmental factors. the first two models could be useful as reference. type of gene-environment interactions are expressed as constraints among coefficients of the multi-logistic model. this approach allows to specify the type of interaction to simulate in a simple manner. another interesting consequence is that for each type of interaction only a subset of coefficients needs to be specified. in the first model, the genetic model, each individual carrying a genotype has the same disease risk regardless of the environmental exposure. this situation is modelled by giving a vanishing effect to the environmental variable, namely fixing all the βi equal to zero. in the second model, the environmental model, the risk is due to the environmental exposure only. this situation is modelled by imposing αi and βi equal across the genotypes with a non-vanishing βi. this choice provides the same risk independently of the carried genotype. the third model simulates the scenario where the gene modules response to environment. in this case the genetics do not directly affect the disease risk, but modules the response to the environmental exposure. in other words, some genotypes are more prone than others to develop the disease if exposed to the same environmental level. in this interaction model all the αi are equal while βi are different. the last is the additive model, where genetic and the environment influence the risk directly, independently and additively. moreover the environmental exposure has the same effect in all the genotypes. for this model, there are no complex interactions between the genetics and the environmental exposure. however, the risk is the sum of that due to the genetic predisposition and that due to the environmental role. of course the user can create further types of gxe by freely imposing αi and βi. knowledge-aided parametrization system to translate the population parameters into coefficients of the mlm, we implemented the knowledge-aided parametrization system. this module derives the values of αi and βi starting from genotype frequencies, relative risk and model of inheritance of the genetic factor, distribution and odds ratio of the environmental factor, type of gxe and the proportion of affected individuals in the sample. the key issue is that the overall disease frequency in the population m is given by dividing eq. by t r and by means of some algebraic manipulation, it is straightforward to show that in a similar way it is possible to derive the expressions for the marginal risks of the other genotypes. by numerically solving this set of three equations it is possible to obtain ai and βi coefficients that match at most the user's requests. algorithm and implementation the simulation procedure is divided into several steps. first of all, the genotypes of g genetic factors and the levels of exposure of e environmental factors are assigned to the n individuals. consequently, the sample population characteristics are input by the user and hence the coefficients of the mlm are calculated. finally, the disease risk and the disease status are assigned to each individual. concerning the genetic factors, the user can provide the allelic frequencies or allow the simulator to randomly select them. in both cases, the hardy-weinberg's law is used for the calculation of the frequencies of the genotypes. afterwards, by means of a monte carlo method, the genotype of each genetic factor is randomly assigned to each individual according to the genotypic frequencies. similarly for the environmental factors, the user can use a distribution function, among a set of predefined ones, or provide an empirical distribution pe(). again by a monte carlo process the exposures of environmental factors are assigned according to distribution functions. after the assignment of the genetic and environmental factors to individuals, the next step is the assignment of the phenotype. for this process the system computes the coefficients of the mlm in order to create the relationship between population characteristics, type of gxe interaction, and disease risk. the actual computation of the coefficients is performed by kaps that, by means of eq. and similar ones for t r and t r solves numerically the resulting system of three equations and returns α α α β β and β the disease risk ≤ 1) is assigned by the mlm by using the parameters previously identified. in particular, for each individual his genotype i establishes the coefficients αi and βi computed by kaps, while the exposure level is the value of the covariate xj. the last step is to assign a disease status to the individuals. again by a monte carlo process, the system generates a random number with uniform distribution in and assigns to the individual the status if this number is less then his risk r, or if otherwise. an implementation of gens is freely available on sourceforge https://sourceforge.net/projects/gensim as a set of matlab scripts that can be freely modified to address different requirements. discussion and  in this article we present a novel mathematical approach to model gxe in complex diseases. this approach is based on a multi-logistic model and it is specifically tailored to model disease risk in data set that simulates case-control samples. we implemented this method in gene-environment interaction simulator, a tool designed to yield case-control samples for gxe. these tools could be useful to generate simulated data sets in order to assess the performances of statistical methods. the necessity to provide simulated populations is due to the difficulty of obtaining real populations in which enough parameters are known to be related to the phenotype. furthermore, during the design of a statistical study, simulated populations can also be used to estimate the expected statistical power when assuming different types of gxe. we focused on inputing characteristics extracted by real populations. in this way it is also easy to replicate real populations and evaluate the change of statistical power due to changes of the parameters as the sample size and the disease frequency and the type of gxe and etc. the key idea underlying the mlm is the modelling of the disease risk in each combination of genetic factors as a different mathematical function of the environmental exposures. in this way it is possible to model any type of interaction between genetic and environmental factors, also complex and non-linear ones. we based our approach on the logistic function. this function is widely used in epidemiological studies and has several advantages. it follows the weber-fechner law and as the value of the risk factor increases it naturally ranges from to. moreover, the coefficients of the covariates correspond to the logarithm of the odds ratio due to a one-unit increase. in particular, in order to calculate the disease risk, the genetic factors of individuals sets coefficients of the function while the environmental factors assign a value to its covariates. we implemented the mlm in the gene-environment interaction simulator, a gxe simulator for case-control studies. the intended audience of gens is the biomedical community, thus the main efforts have been to describe populations by standard epidemiological measures, to implement constraints to make the simulator behaviour biologically meaningful, and to define the gxe in biological understandable terms. in theory, the mlm can model interactions of multi-genetic and multi-environmental factors. however, for the sake of simplicity we focused on an interaction between one genetic and one environmental factor. in this way it is much easier to use as input standard epidemiological measures. nevertheless, even in this simple situation, the handling of the interaction is not straightforward. furthermore, in simulated populations besides the involved factors there are other ones that act as noisy background, as frequently occurs in real data sets. even in this simple scenario, modelling the desired characteristics of a population can be very difficult, except for some particular and simple cases, mainly because it is necessary to provide several coefficients to the mathematical model. however, having several coefficients with a difficult interpretation is a common pitfall when modelling complex interactions. therefore, to overcome this limitation we have implemented the knowledge-aided parametrization subsystem. this system exploits a set of reasonable biological constraints to reduce the complexity of the system. first of all, concerning the genetic factors, we imposed that the risk assigned to the heterozygote falls between the two homozygotes. secondly, we adopted a qualitative description of the gxe. in particular, each type of gxe can be modelled as a set of equality and inequality of αi and βi among genotypes. we pre-determined two types of gxe, an additive and a modulative type. the user has only to select which type of gxe must be simulated, without providing additional information. in this way, we can reduce the complexity of the system and, therefore, reduce the degrees of freedom of the mathematical model. finally, kaps solves the system of equations to derive coefficients in order to comply with both biological constraints and population characteristics imposed by the user. as a consequence, to simulate a population only classical epidemiological parameters have to be provided. however, the user can simulate any kind of interaction by the freedom of inputing all the coefficients of the mlm, and even to substitute the logistic expression with a different one. in population genetics, data simulation has been mainly used to study population evolution, linkage disequilibrium, and pedigree of mendelian disease. although some very interesting tools have been specifically designed for complex diseases, some limitations still exist. for example they do not directly produce case-control data sets. gens is specifically designed to produce case-control data sets as close as possible to real ones in a simple manner. in addition, differently from a naive logistic model, the mlm allows modelling non-liner phenomena such as epistasis. one of the shortcomings of gens compared to other tools could be the limitation of one gene-one environment interactions. however, this choice has been made because it is easier to describe and understand the joint and single role of the factors. it should be noted that this limitation accounts mainly to the present implementation, in particular to kaps. in fact, the multi-logistic model can be easily used to simulate multi genetic-multi environmental factor interactions by applying eq. and providing enough coefficients. the number of environmental factors are increased by adding additional covariates in the functions to consider their effects. instead, the number of genetic factors involved in the disease risk is increased by defining additional logistic functions in the multi-logistic model. for example, with the software a file is provided containing parameters of a non-linear interaction among three genetic and two environmental factors. furthermore, the multi-logistic model can be extended to use different functions for each combination of genetic factors. as our approach is widely based on a monte carlo process, the system naturally takes into account the randomness present in any real data sets obeying to probabilistic laws. in other words, data sets created with the same characteristic results to be randomly different. in conclusion, by the multi-logistic model and gens it is possible to simulate case-control samples of complex diseases where gene-environment interactions influence the disease risk. the user has full control of the main characteristics of the simulated populations and the monte carlo process allows random variability. a knowledge-based approach reduces the complexity of the mathematical model by using reasonable biological constraints and makes the simulation more understandable in biological terms. simulated data sets can be used for the assessment of novel statistical methods or for the evaluation of statistical power when designing a study. authors' contributions ra, mp and gm conceived and developed the model. ra, dda and gr implemented the scripts. mp and sc curated the biological aspect. gm, mn, gr and sc participated in the design and coordination of the overall study, and drafted the manuscript. all authors read and approved the final manuscript. 
in particular, we implemented a simple version of this model in a gene-environment interaction simulator, a tool designed to simulate case-control data sets where a one gene-one environment interaction influences the disease risk. the main aim has been to allow the input of population characteristics by using standard epidemiological measures and to implement constraints to make the simulator behaviour biologically meaningful. a knowledge-based approach reduces the complexity of the mathematical model by using reasonable biological constraints and makes the simulation more understandable in biological terms. the user has full control of the main characteristics of the simulated population and a monte carlo process allows random variability. one reason can be the incomplete knowledge of the power of statistical methods designed to search for risk factors and their interactions in these data sets. to this aim, a possible strategy is to challenge the different statistical methods against data sets where the underlying phenomenon is completely known and fully controllable, for example simulated ones. simulated data sets can be used for the assessment of novel statistical methods or for the evaluation of the statistical power when designing a study. an improvement in this direction would lead to a better understanding and description of gene-environment interactions. we present a mathematical approach that models gene-environment interactions. by this method it is possible to generate simulated populations having gene-environment interactions of any form, involving any number of genetic and environmental factors and also allowing non-linear interactions as epistasis. by the multi-logistic model implemented in gens it is possible to simulate case-control samples of complex disease where gene-environment interactions influence the disease risk. complex diseases are multifactorial traits caused by both genetic and environmental factors. despite a large amount of information that has been collected about both genetic and environmental risk factors, there are few examples of studies on their interactions in epidemiological literature.
 complex diseases are multifactorial traits caused by both genetic and environmental factors. they represent the major part of human diseases and include those with largest prevalence and mortality. despite a large amount of information that has been collected about both genetic and environmental risk factors, there are few examples of studies on their interactions in epidemiological literature. one reason can be the incomplete knowledge of the power of statistical methods designed to search for risk factors and their interactions in these data sets. an improvement in this direction would lead to a better understanding and description of gene-environment interactions. to this aim, a possible strategy is to challenge the different statistical methods against data sets where the underlying phenomenon is completely known and fully controllable, for example simulated ones.  we present a mathematical approach that models gene-environment interactions. by this method it is possible to generate simulated populations having gene-environment interactions of any form, involving any number of genetic and environmental factors and also allowing non-linear interactions as epistasis. in particular, we implemented a simple version of this model in a gene-environment interaction simulator, a tool designed to simulate case-control data sets where a one gene-one environment interaction influences the disease risk. the main aim has been to allow the input of population characteristics by using standard epidemiological measures and to implement constraints to make the simulator behaviour biologically meaningful.  by the multi-logistic model implemented in gens it is possible to simulate case-control samples of complex disease where gene-environment interactions influence the disease risk. the user has full control of the main characteristics of the simulated population and a monte carlo process allows random variability. a knowledge-based approach reduces the complexity of the mathematical model by using reasonable biological constraints and makes the simulation more understandable in biological terms. simulated data sets can be used for the assessment of novel statistical methods or for the evaluation of the statistical power when designing a study. 