foreignAlleles: Identify foreign alleles

Description Usage Arguments Value Author(s) Examples

View source: R/foreignAlleles.R

Description

Identify 'foreign' alleles (alleles present in progeny, but not in parents or other non-parental adults). Note that foreignAlleles does not distinguish between populations as indicated by the popn column of the allele data frame.

Usage

1

Arguments

adata

data frame: the preprocessed allele data set returned by either inputData or preprocessData.

Value

A list, containing two data frames. Data frame byLocus summarises the foreign alleles found at each locus. Data frame byProgenyLocus summarises the same alleles by progeny and locus. In this latter data frame, the code P.missing indicates no alleles were present in the progeny at this locus.

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
23
24
25
## 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

fAlleles <- foreignAlleles(gData)

## View foreign alleles detected at each locus:
fAlleles$byLocus

## View foreign alleles detected in each progeny, at each locus:
fAlleles$byProgenyLocus

## Both of these objects are data frames, hence can be written to file
## via, e.g., write.csv().

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