calc.intersp.het: Calculate Interspecific Heterozygosity

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/calc.intersp.het.R

Description

This function calculates interspecific heterozygosity of individuals from a matrix of allele counts.

Usage

1
calc.intersp.het(introgress.data=NULL)

Arguments

introgress.data

a list produced by prepare.data or a matrix with allele counts.

Details

This function calculates an admixed individual's interspecific heterozygosity (i.e. the proportion of the individual's genome with alleles inherited from both parental populations) based on allele counts. This function should only be used for co-dominant markers.

Value

A numerical vector with an estimate of interspecific heterozygosity for each individual.

Author(s)

Zachariah Gompert zgompert@uwyo.edu, C. Alex Buerkle buerkle@uwyo.edu

See Also

prepare.data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
## load simulated data
## markers have fixed differences, with
## alleles coded as 'P1' and 'P2'
data(AdmixDataSim1)
data(LociDataSim1)

## use prepare.data to produce introgress.data
introgress.data<-prepare.data(admix.gen=AdmixDataSim1,
                              loci.data=LociDataSim1,
                              parental1="P1", parental2="P2",
                              pop.id=FALSE, ind.id=FALSE,
                              fixed=TRUE)

## Estimate inter-specific heterozygosity
int.het<-calc.intersp.het(introgress.data=introgress.data)

## End(Not run)

introgress documentation built on May 2, 2019, 7:24 a.m.