Description Usage Arguments Details Value Author(s) Examples
A function to simulate neighbor effects with given QTL effects, distance scale, and causal markers.
| 1 2 3 4 5 6 7 8 9 10 | 
| genoprobs | Conditional genotype probabilities as taken from  | 
| 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  | 
| 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  | 
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.
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
Yasuhiro Sato (sato.yasuhiro.36c@kyoto-u.jp)
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.