limix.qtl.iscanยถ

limix.qtl.
iscan
(G, y, lik='normal', K=None, M=None, idx=None, E0=None, E1=None, verbose=True)[source]ยถ Singletrait 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 likelihoodratio 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 socalled 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 โ Pvalues, log of marginal likelihoods, effect sizes, and associated statistics.
 Return type
limix.qtl._result.IScanResult
Notes
It will raise a
ValueError
exception if nonfinite values are passed. Please, refer to thelimix.qc.mean_impute()
function for missing value imputation.