multilocusTypes: Genotype summaries

Description Usage Arguments Details Value Author(s) Examples

View source: R/multilocusTypes.R

Description

Return summaries of individual- and multi- locus genotypes for adults and progeny.

Usage

1

Arguments

adata

data frame: the checked and preprocessed dataset returned by inputData.

Details

Function multilocusTypes summarises the different genotypes present at each locus in the dataset (separately for progeny and adults), and across the loci (again, separately for progeny and adults). multilocusTypes returns a list structure with several elements.

Value

A list structure, with the following components:

uniqueProgenyTypes

A data frame containing, for each locus, the distinct genotypes that are present in the progeny in the dataset, and the numbers of progeny containing each genotype at that locus.

numUniqueProgenyTypes

The number of unique genotypes at each locus in the progeny in the dataset.

uniqueAdultTypes

A data frame containing, for each locus, the distinct genotypes that are present in the adults in the dataset, and the numbers of adults containing each genotype at that locus.

numUniqueAdultTypes

The number of unique genotypes at each locus in the adult set.

uniqueProgenyMLTypes

A data frame containing the distinct genotypes across all loci that are present in the progeny in the dataset, and the numbers of progeny containing each multilocus genotype.

numUniqueProgenyMLTypes

The total number of progeny multilocus genotypes.

uniqueAdultMLTypes

A data frame containing, the distinct genotypes across all loci that are present in the adults in the dataset, and the numbers of adults containing each multilocus genotype.

numUniqueAdultMLTypes

The total number of adult multilocus genotypes.

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
## 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

mTypes <- multilocusTypes(gData)

## mTypes is a list structure - individual components can be
## printed to the screen, or saved to file via, e.g. read.csv().

mTypes$numUniqueProgenyTypes

## Components of mTypes
names(mTypes)

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