triangle.plot: Triangle Plot

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

View source: R/triangle.plot.R

Description

This function makes a plot of interspecific heterozygosity as a function of hybrid index.

Usage

1
2
triangle.plot(hi.index=NULL, int.het=NULL, pdf=TRUE,
              out.file="tri_plot.pdf")

Arguments

hi.index

a data frame produced by est.h or a numeric vector of hybrid index estimates.

int.het

a vector of numeric interspecific heterozygosity estimates.

pdf

a logical specifying whether results should be output to a pdf file.

out.file

a character string specifying the name of the output file if pdf=TRUE.

Details

This function plots interspecific heterozygosity as a function of hybrid index for individuals from an admixed population. Individuals that are the progeny of at least one parent from one of the pure parental populations should have maximal heterozygosity for the observed hybrid index. The plot has lines that correspond to these theoretical maximum values. Individuals that fall on the maximal line are likely F1s or backcross progeny. Evidence for individuals of this type will be more likely if the data set consists of loci with no alleles in common between parental species (delta=1), whereas shared alleles will lead to ambiguity in inferring ancestry. Hybrid index estimates can be obtained from the est.h function and interspecific heterozygosity estimates can be obtained from the calc.intersp.het function.

Value

A plot is produced, but there is no return value.

Author(s)

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

See Also

est.h, calc.intersp.het, delta

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
## produce triangle plots
## 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 hybrid index
hi.index<-est.h(introgress.data=introgress.data,
                loci.data=LociDataSim1, fixed=TRUE, p1.allele="P1",
                p2.allele="P2")

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

## make plot
triangle.plot(hi.index=hi.index, int.het=int.het, pdf=FALSE)

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