limix.qtl.iscanยถ

limix.qtl.iscan(G, y, lik='normal', K=None, M=None, idx=None, E0=None, E1=None, verbose=True)[source]ยถ

Single-trait association with interaction test via generalized linear mixed models.

The general formulae for normally distributed traits is

\[\begin{split}๐ฒ = ๐™ผ๐›‚ + (๐™ถโŠ™๐™ดโ‚€)๐›ƒโ‚€ + (๐™ถโŠ™๐™ดโ‚)๐›ƒโ‚ + ๐ฎ + ๐›†,\\ \text{where}~~ ๐ฎโˆผ๐“(๐ŸŽ, ๐“‹โ‚€๐™บ) ~~\text{and}~~ ๐›†โˆผ๐“(๐ŸŽ, ๐“‹โ‚๐™ธ).\end{split}\]

The operator โŠ™ works as follows:

\[๐™ฐโŠ™๐™ฑ = [๐™ฐโ‚€๐™ฑโ‚€ ~~...~~ ๐™ฐโ‚€๐™ฑโ‚™ ~~ ๐™ฐโ‚๐™ฑโ‚€ ~~...~~ ๐™ฐโ‚๐™ฑโ‚™ ~~...~~ ๐™ฐโ‚˜๐™ฑโ‚™]\]

The covariates is enconded in matrix ๐™ผ while the candidate set is enconded in matrix ๐™ถ. The parameters are the effect sizes ๐›‚, ๐›ƒโ‚€, and ๐›ƒโ‚, and the variances ๐“‹โ‚€ and ๐“‹โ‚.

It performs likelihood-ratio tests for the following cases, where the first hypothesis is the null one while the second hypothesis is the alternative one:

  • Hโ‚€ vs Hโ‚: testing for vec(๐›ƒโ‚€) โ‰  ๐ŸŽ while vec(๐›ƒโ‚) = ๐ŸŽ

  • Hโ‚€ vs Hโ‚‚: testing for [vec(๐›ƒโ‚€) vec(๐›ƒโ‚)] โ‰  ๐ŸŽ

  • Hโ‚ vs Hโ‚‚: testing for vec(๐›ƒโ‚) โ‰  ๐ŸŽ

It also supports generalized linear mixed models (GLMM). In this case, the following likelihoods are implemented:

  • Bernoulli

  • Probit

  • Binomial

  • Poisson

Formally, let p(๐œ‡) be one of the supported probability distributions where ๐œ‡ is its mean. The Hโ‚€ model is defined as follows:

\[yแตข โˆผ p(๐œ‡แตข=g(zแตข)) ~~\text{for}~~ ๐ณ โˆผ ๐“(๐™ผ๐›‚ + (๐™ถโŠ™๐™ดโ‚€)๐›ƒโ‚€ + (๐™ถโŠ™๐™ดโ‚)๐›ƒโ‚, ๐“‹โ‚€๐™บ + ๐“‹โ‚๐™ธ).\]

g(โ‹…) is the corresponding canonical link function for the Bernoulli, Binomial, and Poisson likelihoods. The Probit likelihood, on the other hand, is a Bernoulli likelihood with probit link function.

Parameters
  • G (nร—m array_like) โ€“ Genetic candidates.

  • Y (nร—p array_like) โ€“ Rows are samples and columns are phenotypes.

  • lik (tuple, "normal", "bernoulli", "probit", "binomial", "poisson") โ€“ Sample likelihood describing the residual distribution. Either a tuple or a string specifying the likelihood is required. The Normal, Bernoulli, Probit, and Poisson likelihoods can be selected by providing a string. Binomial likelihood on the other hand requires a tuple because of the number of trials: ("binomial", array_like). Defaults to "normal".

  • K (nร—n array_like) โ€“ Sample covariance, often the so-called kinship matrix.

  • M (nร—c array_like) โ€“ Covariates matrix.

  • idx (list) โ€“ List of candidate indices that defines the set of candidates to be used in the tests.

  • E0 (array_like) โ€“ Matrix representing the first environment.

  • E1 (array_like) โ€“ Matrix representing the second environment.

  • verbose (bool, optional) โ€“ True to display progress and summary; False otherwise.

Returns

result โ€“ P-values, log of marginal likelihoods, effect sizes, and associated statistics.

Return type

limix.qtl._result.IScanResult

Notes

It will raise a ValueError exception if non-finite values are passed. Please, refer to the limix.qc.mean_impute() function for missing value imputation.