magic.ped2cross: Convert a pedigree into a crossing plan.

View source: R/magic_ped2cross.R

magic.ped2crossR Documentation

Convert a pedigree into a crossing plan.

Description

This function takes a user provided pedigree and converts it into a crossing plan that can be used in the simulation. The pedigree must have four columns in the following order: individual ID, parent 1 ID, parent 2 ID and generation number. The founders should be present in the pedigree with individual ID of 1 to n, parent 1/2 IDs of 0 (or left empty), and generation number of 0.

Usage

magic.ped2cross(ped)

Arguments

ped

a pedigree.

Value

a list of crossing plans for each crossing generation (xplan).

Examples


mped <- cbind(ind=1:13,
              p1=c(0,0,0,0,1,1,1,2,2,3,5,6,7),
              p2=c(0,0,0,0,2,3,4,3,4,4,10,9,8),
              gen=c(0,0,0,0,1,1,1,1,1,1,2,2,2))
mpop <- magic.ped2cross(ped=mped)



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