Package 'rNeighborQTL'

Title: Interval Mapping for Quantitative Trait Loci Underlying Neighbor Effects
Description: To enable quantitative trait loci mapping of neighbor effects, this package extends a single-marker regression to interval mapping. The theoretical background of the method is described in Sato et al. (2021) <doi:10.1093/g3journal/jkab017>.
Authors: Yasuhiro Sato [aut, cre] , Kazuya Takeda [aut], Atsushi J. Nagano [aut]
Maintainer: Yasuhiro Sato <[email protected]>
License: GPL-3
Version: 1.1.2
Built: 2024-12-23 06:38:41 UTC
Source: CRAN

Help Index


Calculating a set of neighbor QTL effects from conditional genotype probabilities

Description

A function to calculate self QTL effects for all individuals, with given deviation coefficients and conditional genotype probabilities.

Usage

calc_neiprob(
  genoprobs,
  a2,
  d2,
  contrasts = NULL,
  smap,
  scale,
  grouping = rep(1, nrow(smap)),
  d2sq0 = FALSE
)

Arguments

genoprobs

Conditional genotype probabilities as taken from qtl::calc.genoprob().

a2

A numeric scalar indicating additive deviation.

d2

A numeric scalar indicating dominance deviation.

contrasts

A vector composed of three TRUE/FALSE values, which represents the presence/absence of specific genotypes as c(TRUE/FALSE, TRUE/FALSE, TRUE/FALSE) = AA, AB, BB.

smap

A matrix showing a spatial map for individuals. The first and second column include spatial positions along an x-axis and y-axis, respectively.

scale

A numeric scalar indicating the maximum spatial distance between a focal individual and neighbors to define neighbor effects.

grouping

An integer vector assigning each individual to a group. This argument can be used when smap contains different experimental replicates. Default setting means that all individuals are belong to a single group.

d2sq0

An option to make AB/AB interaction effects zero.

Value

A numeric matrix containing individuals x marker elements for neighbor QTL effects.

Author(s)

Yasuhiro Sato ([email protected])


Calculating phenotypic variation explained by neighbor effects

Description

A function to calculate the proportion or ratio of phenotypic variation explained (PVE or RVE) by neighbor effects for a series of neighbor distance (s_seq) using mixed models.

Usage

calc_pve(
  genoprobs,
  pheno,
  smap,
  s_seq,
  addcovar = NULL,
  grouping = rep(1, nrow(smap)),
  response = c("quantitative", "binary"),
  fig = TRUE,
  contrasts = NULL
)

Arguments

genoprobs

Conditional genotype probabilities as taken from qtl::calc.genoprob().

pheno

A vector of individual phenotypes.

smap

A matrix showing a spatial map for individuals. The first and second column include spatial positions along an x-axis and y-axis, respectively.

s_seq

A numeric vector including a set of the maximum spatial distance between a focal individual and neighbors to define neighbor effects. A scalar is also allowed.

addcovar

An optional matrix including additional non-genetic covariates. It contains no. of individuals x no. of covariates.

grouping

An optional integer vector assigning each individual to a group. This argument can be used when smap contains different experimental replicates. Default setting means that all individuals are belong to a single group.

response

An optional argument to select trait types. The "quantitative" or "binary" applies the "lmm.aireml()" or "logistic.mm.aireml()" for a mixed model, respectively.

fig

TRUE/FALSE to add a figure of Delta PVE or not.

contrasts

An optional vector composed of three TRUE/FALSE values, which represents the presence/absence of specific genotypes as c(TRUE/FALSE, TRUE/FALSE, TRUE/FALSE) = AA, AB, BB. If NULL, it is compiled from genoprobs automatically.

Details

This function calls linear or logistic mixed models via the gaston package (Perdry & Dandine-Roulland 2020). If "quantitative" is selected, Var_self or Var_nei in the output is given by the proportion of phenotypic variation explained (PVE) by neighbor effects as PVEnei =σ22/(σ12+σ22+σe2)\sigma^2_2/(\sigma^2_1+\sigma^2_2+\sigma^2_e). If "binary" is selected, Var_self or Var_nei is given by the ratio of phenotypic variation explained (RVE) by neighbor effects as RVEnei =σ22/σ12\sigma^2_2/\sigma^2_1 and p-values are not available. This is because a logistic mixed model logistic.mm.aireml() called via the gaston package does not provide σe2\sigma^2_e and log-likelihood (see Chen et al. 2016 for the theory).

Value

A matrix containing the maximum neighbor distance, phenotypic variation explained by neighbor effects, and p-value by a likelihood ratio test.

  • scale Maximum neighbor distance given as an argument

  • Var_self Proportion or ratio of phenotypic variation explained (PVE or RVE) by self-genotype effects for linear or logistic mixed models, respectively

  • Var_nei Proportion or ratio of phenotypic variation explained (PVE or RVE) by neighbor effects for linear or logistic mixed models, respectively

  • p-value p-value by a likelihood ratio test between models with or without neighbor effects. Self effects are tested when the scale is zero

Author(s)

Yasuhiro Sato ([email protected])

References

  • Perdry H, Dandine-Roulland C (2020) gaston: Genetic Data Handling (QC, GRM, LD, PCA) & Linear Mixed Models. R package version 1.5.6. https://CRAN.R-project.org/package=gaston

  • Chen H, Wang C, Conomos M. et al. (2016) Control for population structure and relatedness for binary traits in genetic association studies via logistic mixed models. The American Journal of Human Genetics 98: 653-666.

Examples

set.seed(1234)
test_map <- qtl::sim.map(len=rep(20,5),n.mar=3,include.x=FALSE)
test_cross <- qtl::sim.cross(test_map,n.ind=50)
test_smap <- cbind(runif(50,1,100),runif(50,1,100))
test_genoprobs <- qtl::calc.genoprob(test_cross,step=2)
s_seq <- quantile(dist(test_smap),c(0.1*(1:10)))

test_pve <- calc_pve(genoprobs=test_genoprobs,
                     pheno=test_cross$pheno$phenotype,
                     smap=test_smap, s_seq=s_seq,
                     )

Decomposition of conditional genotype probabilities

Description

A function to decompose qtl's object of conditional genotype probabilities.

Usage

decompose_genoprobs(genoprobs, contrasts = NULL)

Arguments

genoprobs

Conditional genotype probabilities as taken from qtl::calc.genoprob().

contrasts

A vector composed of three TRUE/FALSE values, which represents the presence/absence of specific genotypes as c(TRUE/FALSE, TRUE/FALSE, TRUE/FALSE) = AA, AB, BB.

Value

A list of three numeric matrices for genotype probabilities AA, AB, and BB. Each contains elements of individuals x markers.

  • AA Homozygote AA probabilities.

  • AB Heterozygote AB probabilities for. NA if inbred lines

  • BB Homozygote BB probabilities. NA if backcross lines

Author(s)

Yasuhiro Sato ([email protected])


Estimation of self and neighbor QTL effects across a genome

Description

A function to estimate additive and dominance deviation for self and neighbor QTL effects by a simple regression.

Usage

eff_neighbor(
  genoprobs,
  pheno,
  smap,
  scale,
  addcovar = NULL,
  addQTL = NULL,
  grouping = rep(1, nrow(smap)),
  response = c("quantitative", "binary"),
  fig = TRUE,
  contrasts = NULL
)

Arguments

genoprobs

Conditional genotype probabilities as taken from qtl::calc.genoprob().

pheno

A vector of individual phenotypes.

smap

A matrix showing a spatial map for individuals. The first and second column include spatial position along an x-axis and y-axis, respectively.

scale

A numeric scalar indicating the maximum spatial distance between a focal individual and neighbors to define neighbor effects.

addcovar

An optional matrix including additional non-genetic covariates. It contains no. of individuals x no. of covariates.

addQTL

An optional vector containing marker names that are considered covariates. Namely, this option allows composite interval mapping (Jansen 1993).

grouping

An optional integer vector assigning each individual to a group. This argument can be used when smap contains different experimental replicates. Default setting means that all individuals are belong to a single group.

response

An optional argument to select trait types. The "quantitative" or "binary" calls the "gaussian" or "binomial" family in glm(), respectively.

fig

TRUE/FALSE to plot the effects or not.

contrasts

An optional vector composed of three TRUE/FALSE values, which represents the presence/absence of specific genotypes as c(TRUE/FALSE, TRUE/FALSE, TRUE/FALSE) = AA, AB, BB. If NULL, it is compiled from genoprobs automatically.

Details

Similar to Haley-Knott regression (Haley & Knott 1992), the additive and dominance deviations are approximated by a regression of trait values on conditional genotype probabilities. The self QTL effects a1 and d1 are estimated in the same way as the qtl package performs the Haley-Knott regression. If contrasts = c(TRUE, TRUE, TRUE), neighbor QTL effects a1 and d1 are estimated using a quadratic regression; otherwise, the additive neighbor effects are estimated using a linear regression. See also Sato, Takeda & Nagano (2021) for the rationale behind the approximation.

Value

A matrix of estimated additive and dominance deviation for self and neighbor effects, with the chromosome numbers and positions. The row names correspond to marker names.

  • chr Chromosome number

  • pos Marker position

  • a1 Additive deviation for self effects

  • d1 Dominance deviation for self effects

  • a2 Additive deviation for neighbor effects

  • d2 Dominance deviation for neighbor effects

Author(s)

Yasuhiro Sato ([email protected])

References

  • Haley CS, Knott SA (1992) A simple regression method for mapping quantitative trait loci in line crosses using flanking markers. Heredity 69:315-324.

  • Jansen RC (1993) Interval mapping of multiple quantitative trait loci. Genetics 135:205-211.

  • Sato Y, Takeda K, Nagano AJ (2021) Neighbor QTL: an interval mapping method for quantitative trait loci underlying plant neighborhood effects. G3; Genes|Genomes|Genetics 11:jkab017.

Examples

set.seed(1234)
test_map <- qtl::sim.map(len=rep(20,5),n.mar=3,include.x=FALSE)
test_cross <- qtl::sim.cross(test_map,n.ind=50)
test_smap <- cbind(runif(50,1,100),runif(50,1,100))
test_genoprobs <- qtl::calc.genoprob(test_cross,step=2)

test_eff <- eff_neighbor(genoprobs=test_genoprobs,
                         pheno=test_cross$pheno$phenotype,
                         smap=test_smap, scale=20, fig=TRUE
                         )

Calculating a set of self QTL effects from conditional genotype probabilities

Description

A function to reshape qtl's object of conditional genotype probabilities, and to calculate self QTL effects for all individuals with given deviation coefficients and conditional genotype probabilities.

Usage

genoprobs2selfprobs(genoprobs, a1, d1, contrasts = NULL)

Arguments

genoprobs

Conditional genotype probabilities as taken from qtl::calc.genoprob().

a1

A numeric scalar indicating additive deviation.

d1

A numeric scalar indicating dominance deviation.

contrasts

A vector composed of three TRUE/FALSE values, which represents the presence/absence of specific genotypes as c(TRUE/FALSE, TRUE/FALSE, TRUE/FALSE) = AA, AB, BB.

Value

A numeric matrix containing individuals x marker elements for self QTL effects.

Author(s)

Yasuhiro Sato ([email protected])


Reshaping marker information

Description

A function to get marker information from a genetic map including observed and pseudo markers

Usage

get_markers(genoprobs)

Arguments

genoprobs

Conditional genotype probabilities as taken from qtl::calc.genoprob().

Value

A matrix showing the chromosome numbers (the first column) and positions (the second column) for all markers (row names).

Author(s)

Yasuhiro Sato ([email protected])


Testing marker-by-marker epistasis in neighbor QTL effects

Description

A function to test interaction terms between one focal marker and the other markers across a genome.

Usage

int_neighbor(
  genoprobs,
  pheno,
  smap,
  scale,
  addcovar = NULL,
  addQTL,
  intQTL,
  grouping = rep(1, nrow(smap)),
  response = c("quantitative", "binary"),
  contrasts = NULL
)

Arguments

genoprobs

Conditional genotype probabilities as taken from qtl::calc.genoprob().

pheno

A vector of individual phenotypes.

smap

A matrix showing a spatial map for individuals. The first and second column include spatial positions along an x-axis and y-axis, respectively.

scale

A numeric scalar indicating the maximum spatial distance between a focal individual and neighbors to define neighbor effects.

addcovar

An optional matrix including additional non-genetic covariates. It contains no. of individuals x no. of covariates.

addQTL

A vector containing marker names that are considered covariates. This argument is necessary for int_neighbor(), and must match the marker names of gmap.

intQTL

A name of a focal marker to be tested for its epistasis with the other markers in neighbor effects. The marker name must be included by addQTL.

grouping

An optional integer vector assigning each individual to a group. This argument can be used when smap contains different experimental replicates. Default setting means that all individuals are belong to a single group.

response

An optional argument to select trait types. The "quantitative" or "binary" calls the "gaussian" or "binomial" family in glm(), respectively.

contrasts

An optional vector composed of three TRUE/FALSE values, which represents the presence/absence of specific genotypes as c(TRUE/FALSE, TRUE/FALSE, TRUE/FALSE) = AA, AB, BB. If NULL, it is compiled from genoprobs automatically.

Details

This is an optimal function to test two-way interactions between the main neighbor effect of a focal marker given by intQTL and the others. All the main neighbor effects are first estimated using eff_neighbor(), and then a two-way interaction term between the focal marker effect and its counterpart was considered an additional explanatory variable. LOD score was compared between models with or without the two-way interaction.

Value

A matrix of LOD scores for neighbor epistasis effects, with the chromosome numbers and positions. The row names correspond to marker names.

  • chr Chromosome number

  • pos Marker position

  • LOD_int LOD score for epistasis in neighbor effects between a focal and the other markers

Author(s)

Yasuhiro Sato ([email protected])

See Also

scan_neighbor eff_neighbor

Examples

set.seed(1234)
test_map <- qtl::sim.map(len=rep(20,5),n.mar=3,include.x=FALSE)
test_cross <- qtl::sim.cross(test_map,n.ind=50)
test_smap <- cbind(runif(50,1,100),runif(50,1,100))
test_genoprobs <- qtl::calc.genoprob(test_cross,step=2)

test_int <- int_neighbor(genoprobs=test_genoprobs,
                         pheno=test_cross$pheno$phenotype,
                         smap=test_smap,scale=20,
                         addQTL=c("c1_D1M1","c1_D1M2"),intQTL="c1_D1M1"
                         )
plot_nei(test_int, type="int")

Calculating log-likelihood in generalized linear models

Description

An utility function to extract log-likelihood based on AIC of glm.fit()

Usage

logLik_glm.fit(...)

Arguments

...

Arguments to be passed to glm.fit().

Value

Log-likelihood


Calculating the minimum distance

Description

A function to calculate a Euclidian distance including at least one neighbor for all individuals.

Usage

min_dist(smap, grouping = rep(1, nrow(smap)))

Arguments

smap

A matrix showing a spatial map. The first and second column include spatial points along a x-axis and y-axis, respectively.

grouping

A integer vector assigning each individual to a group. This argument can be useful when a "smap" contains different experimental replicates. Default setting means that all individuals are belong to a single group.

Value

Return a scalar of the minimum Euclidian distance that allows all individuals to have at least one neighbor.

Author(s)

Yasuhiro Sato ([email protected])


Calculating neighbor QTL effects

Description

A function to calculate neighbor QTL effects between two individuals, with given deviation coefficients and conditional genotype probabilities.

Usage

neiprob(i, j, a2, d2, AA, AB, BB, d2sq0 = FALSE)

Arguments

i

ID of a target individual.

j

ID of an interacting neighbor.

a2

A numeric scalar indicating additive deviation.

d2

A numeric scalar indicating dominance deviation.

AA

An individual x marker matrix of conditional probabilities for AA genotype.

AB

An individual x marker matrix of conditional probabilities for AB genotype. Input NA if heterozygotes are absent.

BB

An individual x marker matrix of conditional probabilities for BB genotype. Input NA for backcross lines.

d2sq0

An option to make AB/AB interaction effects zero.

Value

A numeric vector containing each marker effect for individual i.

Author(s)

Yasuhiro Sato ([email protected])


Permutation tests for neighbor effects with a QTL model

Description

A function to calculate a genome-wide LOD threshold using permutation tests for self or neighbor effects.

Usage

perm_neighbor(
  genoprobs,
  pheno,
  smap,
  scale,
  addcovar = NULL,
  addQTL = NULL,
  intQTL = NULL,
  grouping = rep(1, nrow(smap)),
  response = c("quantitative", "binary"),
  type = c("neighbor", "self", "int"),
  times = 99,
  p_val = 0.05,
  n_core = 1L,
  contrasts = NULL
)

Arguments

genoprobs

Conditional genotype probabilities as taken from qtl::calc.genoprob().

pheno

A vector of individual phenotypes.

smap

A matrix showing a spatial map for individuals. The first and second column include spatial positions along an x-axis and y-axis, respectively.

scale

A numeric scalar indicating the maximum spatial distance between a focal individual and neighbors to define neighbor effects.

addcovar

An optional matrix including additional non-genetic covariates. It contains no. of individuals x no. of covariates.

addQTL

An optional vector containing marker names that are considered covariates. Namely, this option allows composite interval mapping (Jansen 1993).

intQTL

An option when using int_neighbor(). A name of a focal marker to be tested for its epistasis with the other markers in neighbor effects. The marker name must be included by addQTL.

grouping

An optional integer vector assigning each individual to a group. This argument can be used when smap contains different experimental replicates. Default setting means that all individuals are belong to a single group.

response

An optional argument to select trait types. The "quantitative" or "binary" calls the "gaussian" or "binomial" family in glm(), respectively.

type

Select "self", "neighbor", or "int" to perform permutation tests for self effects, neighbor effects, or neighbor epistasis, respectively.

times

No. of permutation iterations. Default at 99 times

p_val

A vector indicating upper quantiles for permutation LOD scores

n_core

No. of cores for a parallel computation. This does not work for Windows OS. Default is a single-core computation.

contrasts

An optional vector composed of three TRUE/FALSE values, which represents the presence/absence of specific genotypes as c(TRUE/FALSE, TRUE/FALSE, TRUE/FALSE) = AA, AB, BB. If NULL, it is compiled from genoprobs automatically.

Value

LOD thresholds at given quantiles by p-val

Author(s)

Yasuhiro Sato ([email protected])

See Also

plot_nei scan_neighbor int_neighbor

Examples

set.seed(1234)
test_map <- qtl::sim.map(len=rep(20,5),n.mar=3,include.x=FALSE)
test_cross <- qtl::sim.cross(test_map,n.ind=50)
test_smap <- cbind(runif(50,1,100),runif(50,1,100))
test_genoprobs <- qtl::calc.genoprob(test_cross,step=2)

test_perm <- perm_neighbor(genoprobs=test_genoprobs,
                           pheno=test_cross$pheno$phenotype,
                           smap=test_smap,scale=20,
                           times=3, p_val=c(1.0,0.5)
                           )

Plot self and neighbor QTL effects across a genome

Description

Plot estimated additive and dominance deviation for self or neighbor effects across a genome

Usage

plot_eff(res, type = c("neighbor", "self"))

Arguments

res

Output results of eff_neighbor().

type

An option to select "self" or "neighbor" effects to be shown. Default is "neighbor".

Author(s)

Yasuhiro Sato ([email protected])

See Also

eff_neighbor


Plot LOD score for self or neighbor QTL effects

Description

Plot LOD curves for a genome scan of self and neighbor QTL effects.

Usage

plot_nei(res, type = c("neighbor", "self", "int"), chr = NULL, th = NULL, ...)

Arguments

res

Output results of scan_neighbor().

type

Plot "self", "neighbor" or "int" effects. Default is "neighbor" effects.

chr

An optional vector to select chromosome numbers to be plotted. If NULL, shown are all chromosomes.

th

Add genome-wide threshold by user-defined vectors or Bonferroni correction. Default is no thresholds added.

...

Arguments to be passed to plot().

Details

For the type argument, "int" can be selected to draw the results of int_neighbor(). In this case, the res object and type must match, otherwise it returns an error message.

Author(s)

Yasuhiro Sato ([email protected])

See Also

scan_neighbor int_neighbor perm_neighbor


Genome scan for neighbor effects with a QTL model

Description

Genome scan using a QTL model for self and neighbor effects, with possible allowance for additional covariates and non-normal traits. Theoretical background is described in Sato, Takeda & Nagano (2021).

Usage

scan_neighbor(
  genoprobs,
  pheno,
  smap,
  scale,
  addcovar = NULL,
  addQTL = NULL,
  grouping = rep(1, nrow(smap)),
  response = c("quantitative", "binary"),
  contrasts = NULL
)

Arguments

genoprobs

Conditional genotype probabilities as taken from qtl::calc.genoprob().

pheno

A vector of individual phenotypes.

smap

A matrix showing a spatial map for individuals. The first and second column include spatial positions along an x-axis and y-axis, respectively.

scale

A numeric scalar indicating the maximum spatial distance between a focal individual and neighbors to define neighbor effects.

addcovar

An optional matrix including additional non-genetic covariates. It contains no. of individuals x no. of covariates.

addQTL

An optional vector containing marker names that are considered covariates. Namely, this option allows composite interval mapping (Jansen 1993).

grouping

An optional integer vector assigning each individual to a group. This argument can be used when smap contains different experimental replicates. Default setting means that all individuals are belong to a single group.

response

An optional argument to select trait types. The "quantitative" or "binary" calls the "gaussian" or "binomial" family in glm(), respectively.

contrasts

An optional vector composed of three TRUE/FALSE values, which represents the presence/absence of specific genotypes as c(TRUE/FALSE, TRUE/FALSE, TRUE/FALSE) = AA, AB, BB. If NULL, it is compiled from genoprobs automatically.

Details

This function calculates LOD score after the additive and dominance deviation are estimated using eff_neighbor(). As it adopts a stepwise testing from self to neighbor effects, LOD_self are the same as standard QTL mapping. Note that the results return 0 LOD scores for covariate markers when using addQTL option.

Value

A matrix of LOD scores for self and neighbor effects, with the chromosome numbers and positions. The row names correspond to marker names.

  • chr Chromosome number

  • pos Marker position

  • LOD_self LOD score for self effects

  • LOD_nei LOD score for neighbor effects

Author(s)

Yasuhiro Sato ([email protected])

References

  • Jansen RC (1993) Interval mapping of multiple quantitative trait loci. Genetics 135:205-211.

  • Sato Y, Takeda K, Nagano AJ (2021) Neighbor QTL: an interval mapping method for quantitative trait loci underlying plant neighborhood effects. G3; Genes|Genomes|Genetics 11:jkab017.

See Also

eff_neighbor

Examples

set.seed(1234)
test_map <- qtl::sim.map(len=rep(20,5),n.mar=3,include.x=FALSE)
test_cross <- qtl::sim.cross(test_map,n.ind=50)
test_smap <- cbind(runif(50,1,100),runif(50,1,100))
test_genoprobs <- qtl::calc.genoprob(test_cross,step=2)

test_scan <- scan_neighbor(genoprobs=test_genoprobs,
                           pheno=test_cross$pheno$phenotype,
                           smap=test_smap, scale=20
                           )
plot_nei(test_scan)

Calculating self QTL effects

Description

A function to calculate self QTL effects for an individual, with given deviation coefficients and conditional genotype probabilities.

Usage

selfprob(i, a1, d1, AA, AB, BB)

Arguments

i

ID of a target individual.

a1

A numeric scalar indicating additive deviation.

d1

A numeric scalar indicating dominance deviation.

AA

An individual x marker matrix of conditional probabilities for AA genotype.

AB

An individual x marker matrix of conditional probabilities for AB genotype. Input NA if heterozygotes are absent.

BB

An individual x marker matrix of conditional probabilities for BB genotype. Input NA for backcross lines.

Value

A numeric vector containing each marker effect for individual i.

Author(s)

Yasuhiro Sato ([email protected])


Phenotype simulation for neighbor QTL effects

Description

A function to simulate neighbor effects with given QTL effects, distance scale, and causal markers.

Usage

sim_nei_qtl(
  genoprobs,
  a2,
  d2,
  smap,
  scale,
  grouping = rep(1, nrow(smap)),
  n_QTL = 1,
  contrasts = NULL
)

Arguments

genoprobs

Conditional genotype probabilities as taken from qtl::calc.genoprob().

a2

A numeric scalar indicating additive deviation.

d2

A numeric scalar indicating dominance deviation.

smap

A matrix showing a spatial map for individuals. The first and second column include spatial positions along an x-axis and y-axis, respectively.

scale

A numeric scalar indicating the maximum spatial distance between a focal individual and neighbors to define neighbor effects.

grouping

An integer vector assigning each individual to a group. This argument can be used when smap contains different experimental replicates. Default setting means that all individuals are belong to a single group.

n_QTL

A positive integer indicating the number of causal markers.

contrasts

An optional vector composed of three TRUE/FALSE values, which represents the presence/absence of specific genotypes as c(TRUE/FALSE, TRUE/FALSE, TRUE/FALSE) = AA, AB, BB. If NULL, it is compiled from genoprobs automatically.

Details

Major genetic effects, a2 and d2, are allocated to causal loci randomly selected by n_QTL, while minor polygenic effects (i.e., 1% of a2) are allocated to the other loci.

Value

A numeric matrix containing individuals x marker elements for neighbor QTL effects.

  • true_scale True distance scale of simulated neighbor effects

  • true_marker The name(s) of causal markers

  • nei_y Simulated neighbor effects standardized to have zero mean and one variance

Author(s)

Yasuhiro Sato ([email protected])

Examples

set.seed(1234)
test_map <- qtl::sim.map(len=rep(20,5),n.mar=3,include.x=FALSE)
test_cross <- qtl::sim.cross(test_map,n.ind=50)
test_smap <- cbind(runif(50,1,100),runif(50,1,100))
test_genoprobs <- qtl::calc.genoprob(test_cross,step=2)

nei_eff <- sim_nei_qtl(genoprobs=test_genoprobs, a2=0.5, d2=0.5,
                       smap=test_smap,
                       scale=20, n_QTL=1)

test_scan <- scan_neighbor(genoprobs=test_genoprobs,
                           pheno=nei_eff$nei_y,
                           smap=test_smap, scale=20
                           )
plot_nei(test_scan)