predictCross: Predicts offspring distributions resulting from a cross...

Description Usage Arguments Value Examples

View source: R/crossing.R

Description

Predicts offspring distributions resulting from a cross between two genotypes.

Usage

1
2
predictCross(genopheno, mom, dad, equivalent = "phase",
  output = "both")

Arguments

genopheno

genopheno object specifying the genetic setup.

mom

Genotype of the mother.

dad

Genotype of the father.

equivalent

Argument determining which genotypes are to be treated as equivalent. Possible options are "phase" (genotypes that differ only by phase are equivalent, i.e. the order of alleles within a locus does not matter), "origin" (phase is important but not the origin of alleles), and "none" (no two genotypes are equivalent).

output

Specifies what the function should return: 'genotypes' returns the distribution of offspring genotypes, 'phenotypes' returns the distribution of offspring phenotypes, and 'both' returns both distributions.

Value

Depending on the output argument, a dataframe containing the distribution of offspring genotypes, a dataframe containing the distribution of offspring phenotypes, or both (combined in a list).

Examples

1
2
3
4
5
MendelsPeas <- newGenopheno(alleleNames = list(c('Y', 'y')))
MendelsPeas <- setPhenotypes(MendelsPeas, 'colour', 'Y_', 'yellow')
MendelsPeas <- setPhenotypes(MendelsPeas, 'colour', 'yy', 'green')
predictCross(MendelsPeas, 'YY', 'yy')
predictCross(MendelsPeas, 'Yy', 'Yy')

JanEngelstaedter/peas documentation built on May 5, 2019, 1:33 a.m.