potentialFatherCounts: Count potential fathers

Description Usage Arguments Details Value Author(s) Examples

View source: R/potentialFatherCounts.R

Description

Count the number of potential fathers detected for each progeny.

Usage

1
potentialFatherCounts(dataset, mismatches = 0, VLTMin = 1)

Arguments

dataset

list: a list structure previously output from genotPPE or phenotPPE.

mismatches

integer: the maximum allowed number of mismatching loci between candidate and progeny, before the candidate is rejected as a potential father.

VLTMin

integer: the minimum number of ‘valid’ loci (loci at which a valid progeny-candidate comparison was possible) required for a candidate to be considered as a potential father.

Details

Given the output from genotPPE or phenotPPE, potentialFatherCounts returns, for each progeny, the number of candidates that are identified as potential fathers.

To decide whether a given candidate is a potential father to a given progeny, potentialFatherCounts uses the quantities FLCount (the number of loci at which a candidate can provide a gamete compatible with the progeny) and VLTotal (the number of loci at which a valid comparison was possible - ‘valid’ loci) that are returned by genotPPE or phenotPPE.

For a candidate to be identified as a potential father of a progeny, there are two criteria to be met:

  1. VLTotal >= max(VLTMin,mismatches+1),

  2. FLCount >= VLTotal-mismatches.

Here, VLTmin and mismatches are user-specified parameters. VLTmin allows the user to ensure that a candidate is only considered for potential fatherhood if a sufficient number of valid loci were available for comparison. mismatches allows the user to specify a maximum number of allowed mismatching loci between progeny and candidate, before the candidate is rejected as a potential father. Hence the user may wish to relax the condition that ALL valid loci must match for a candidate to be regarded as a potential father to a progeny.

Value

A data frame, containing columns Progeny (progeny id), Mother (id of the progeny's mother) and potentialFatherCount (the number of potential fathers found for the given progeny, given the criteria described above).

Author(s)

Alexander Zwart (alec.zwart at csiro.au)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Using the example dataset 'FR_Genotype':
data(FR_Genotype)

## Since we did not load this dataset using inputData(), we must
## first process it with preprocessData() before doing anything
## else:
gData <- preprocessData(FR_Genotype,
                        numLoci=7,
                        ploidy=4,
                        dataType="genotype",
                        dioecious=TRUE,
                        mothersOnly=TRUE)

head(gData)  ## Checked and Cleaned version of FR_Genotype

gPPE <- genotPPE(gData)  ## Perform the exclusion analyses

## Obtain counts of potential fathers of each seedling, allowing a
## single allele mismatch:
pFC <- potentialFatherCounts(gPPE,mismatches=1,VLTMin=2)

## pFC can be viewed or written to file via, e.g. write.csv()

PolyPatEx documentation built on May 2, 2019, 3:01 a.m.