getScores: Get all of the 'missing', 'invalid', and 'descrepant' loci...

Description Usage Arguments Value

View source: R/getScores.R

Description

Get all of the missing, invalid, and descrepant loci scores.

Usage

1
getScores(trios, animalAlleles)

Arguments

trios

List containing a list for each offspring. Each offspring list contains a named character vector of length one (offspring) containing the offspring ID, a character vector of potential dams (dams), and a named character vector of potential sires (sires).

animalAlleles

List with all allele information for all animals.

Value

A list containing a named list for each offspring. The name of each list is the offspring's animal ID. Within each offspring list is a list of potential dams and each of those lists is named using the potential dam's ID. The dam's list contains the following data.

  1. refId The ID of the offspring

  2. parentSex The sex of the potential dam, which should always be "F".

  3. missingLoci The number of missing loci, which are the loci without genotypes in the parent.

  4. invalidLoci The number of invalid loci, which are the loci missing in the offspring but present in the parent.

  5. discrepantLoci The number of discrepant loci, the non-matching loci in the parent in offspring where both have genotypes.

  6. numLociCompared The number of loci compared

  7. fractionNonDiscrepant The fraction of non-discrepant loci, which is the ratio of (numLociCompared - discrepantLoci) / numLociCompared.

  8. pkMatch A list with the following three elements.

    • kid The ID of the offspring

    • pkLMatch A logical vector representing the concordance (TRUE) or non-concordance FALSE between the kid and dam's left allele (pkLMatch)

    • pkRMatch A logical vector representing the concordance (TRUE) or non-concordance FALSE between the kid and dam's right allele (pkRMatch).

  9. text A character vector describing each discrepant record. Each element contains the name of the discrepant locus, the offspring's genotype and the dam's genotype.

  10. sires A list of potential sires nested within the current dam of the list of dams nested inside the current offspring. Each sire is represented with a named list with the sire ID as the name of the list and the contents of the list are as follows:

    1. refId The offspring ID

    2. parentSex Sex of the sire, which should always be "M"

    3. missingLoci The number of missing loci, which are the loci without genotypes in the parent.

    4. invalidLoci The number of invalid loci, which are the loci missing in the offspring but present in the parent.

    5. discrepantLoci The number of discrepant loci, the non-matching loci in the parent in offspring where both have genotypes.

    6. numLociCompared The number of loci compared

    7. fractionNonDiscrepant The fraction of non-discrepant loci, which is the ratio of (numLociCompared - discrepantLoci) / numLociCompared.

    8. pkMatch A list with the following three elements.

      • kid The ID of the offspring

      • pkLMatch A logical vector representing the concordance (TRUE) or non-concordance FALSE between the kid and dam's left allele (pkLMatch)

      • pkRMatch A logical vector representing the concordance (TRUE) or non-concordance FALSE between the kid and dam's right allele (pkRMatch).

    9. text A character vector describing each discrepant record. Each element contains the name of the discrepant locus, the offspring's genotype and the sire's genotype.


rmsharp/parentfindr documentation built on Nov. 29, 2020, 4:33 a.m.