gamete_genotypes: Gamete and gametic frequency of polyploid genotypes for a...

Description Usage Arguments Value Examples

View source: R/gamete_genotypes.R

Description

Taking a string input of genotype of an individual, function finds the gamete types possible and its probability in a random meiosis event.

Usage

1

Arguments

x

A character vector of length 4 indicating allelic composition of the locus in the tetraploid genotype

Value

A tbl

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
require(tidyverse)
gamete_genotypes(c("a+", "a+", "a", "a")) %>%
  # since a+a and aa+ are indistinguishible in phenotype, these two classes can be merged
  mutate(v_comb = fct_recode(v_comb, "aa+" = "a+a")) %>%
  group_by(v_comb) %>%
  summarise_at(c("n", "prop_n"), sum)

## Not run: 
# notice how quickly homolog permutation increases as ploidy level increase
# with just 8 homologues there are ~40k permutations,
combinat::permn(c("a+", "a+", "a", "a", "a", "a+", "a+", "a+"), c) 
# but note that unique combinations are far less: 56
combinat::permn(c("a+", "a+", "a", "a", "a", "a+", "a+", "a+"), c) 

## End(Not run)

DeependraD/expdean documentation built on Nov. 25, 2019, 12:33 a.m.