magic.eval: Main function to design and test MAGIC population.

View source: R/magic_eval.R

magic.evalR Documentation

Main function to design and test MAGIC population.

Description

This function takes various input arguments from user and simulates the desired MAGIC design. The MAGIC population can be designed by either providing a pedigree or other input arguments. Depending on the input arguments, a full, partial, basic or NP2 MAGIC design can be created. For the partial or NP2 designs, the funnels can be generated in either a balanced or unbalanced (random) way. For further information, please refer to the vignette.

Usage

magic.eval(
  ped = NULL,
  n = NULL,
  m = NULL,
  reps = NULL,
  self = NULL,
  inbred = TRUE,
  balanced = FALSE,
  minimize = FALSE,
  n.try = 1000,
  addx = NULL,
  repx = 1,
  selfx = 3,
  marker.dist = 0.01,
  chr.len = c(1, 2),
  n.sim = 1,
  hap.int = 0.05,
  n.hap = 1,
  keep = FALSE
)

Arguments

ped

a pedigree with 4 columns: individual ID, parent 1 ID, parent 2 ID, generation number, in the format of either matrix or data.frame.

n

an integer of number of founders.

m

an integer of number of funnels (balanced=FALSE) or funnel sets (balanced=TRUE).

reps

a vector of replicates in each crossing generation.

self

a vector of number of generations to self after crossing.

inbred

a logical indicator of whether the founders are inbred.

balanced

a logical indicator of whether a balanced partial design is desired.

minimize

a logical indicator of whether to minimize crossing.

n.try

an integer of number of attempts to find balanced partial design (ignored if balanced=FALSE).

addx

an integer of either 1 or 2 indicating the type of additional crosses.

repx

an integer of number of replicates in the additional crossing.

selfx

an integer of number of generations to self after additional crossing.

marker.dist

a numerical value of marker distance in Morgan.

chr.len

a vector of chromosome lengths in Morgan.

n.sim

an integer of number of simulations.

hap.int

a numerical value of marker interval for evaluating haplotypes.

n.hap

an integer of 1 or 2 haploid marker data of each RIL are used.

keep

a logical indicator of whether to export the marker data.

Value

a list of simulation summary.

Examples


mpop <- magic.eval(n=8, m=1, reps=c(1,1,2), self=c(0,0,3), balanced=TRUE)



cjyang-sruc/magicdesign documentation built on March 19, 2022, 9:34 a.m.