multidog_to_g {segtest}R Documentation

Converts multidog output to a format usable for multi_lrt()

Description

Converts multidog output to a format usable for multi_lrt()

Usage

multidog_to_g(
  mout,
  type = c("off_gl", "all_gl", "all_g", "off_g"),
  p1 = NULL,
  p2 = NULL,
  ploidy = 4
)

Arguments

mout

The output of multidog().

type
"off_gl"

Genotype likelihoods of offspring but not parents. This is the typical choice if you used the "f1" or "f1pp" options when genotyping.

"all_gl"

Genotype likelihoods of offspring and parents. This is only done if you did not use the "f1" or "f1pp" options when genotyping. If this is the case, then you need to specify which individuals are the parents.

"off_g"

Genotypes, assuming that they are known. You used the "f1" or "f1pp" option when genotyping.

"all_g"

Genotypes, assuming that they are known. You did not use the "f1" or "f1pp" option when genotyping. If this is the case, then you need to specify which individuals are the parents

.

p1

The first parent name if using type = "all_gl" or type = "all_g".

p2

The second parent name if using type = "all_gl" or type = "all_g".

ploidy

The ploidy. Note that most methods in this package (including those in multi_lrt()) assume that the ploidy is 4. But we allow for arbitrary ploidy in this function since it might be useful in the future.

Value

A list with the following elements

g

Either a matrix of counts, where the columns index the genotype and the rows index the loci (type = "all_g" or type = "off_g"). Or an array of genotype (natural) log-likelihoods where the rows index the loci, the columns index the individuals, and the slices index the genotypes (type = "all_gl" or type = "off_gl").

p1

Either a vector of known parental genotypes (type = "off_gl", type = "all_g" or type = "off_g"). Or a matrix of genotype (natural) log-likelihoods where the rows index the loci and the columns index the genotypes (type = "all_gl").

p2

Either a vector of known parental genotypes (type = "off_gl", type = "all_g" or type = "off_g"). Or a matrix of genotype (natural) log-likelihoods where the rows index the loci and the columns index the genotypes (type = "all_gl").

Author(s)

David Gerard

Examples

multidog_to_g(mout = ufit, type = "all_g", p1 = "indigocrisp", p2 = "sweetcrisp")
multidog_to_g(mout = ufit, type = "all_gl", p1 = "indigocrisp", p2 = "sweetcrisp")
multidog_to_g(mout = ufit2, type = "off_g")
multidog_to_g(mout = ufit2, type = "off_gl")
multidog_to_g(mout = ufit3, type = "off_g")
multidog_to_g(mout = ufit3, type = "off_gl")



[Package segtest version 1.0.2 Index]