fingers: Infer clusters of related individuals

View source: R/fingers.R

fingersR Documentation

Infer clusters of related individuals

Description

Perform hierarchical clustering to infer groups of related individuals with RAPD data.

Usage

fingers(dist,cutoff=NULL,method=c("average","complete",
         "mcquitty","single","ward"),truefam=NULL,
         make.plot=FALSE,just.plot=FALSE)

Arguments

dist

A matrix of size (n.ind x n.ind) containing the distances between individuals.

cutoff

A value to use to cut off the dendogram formed by hierarchical clustering in order to define a set of clusters. (Optional, but if NULL, the argument truefam must be included.)

method

A hierarchical clustering method. See hclust. Note: We haven't allowed centroid or median, because these weren't working for us.

truefam

The true family structure; used only if cutoff is NULL, in which case all possible cutoffs are tried, and that giving the maximum adjusted Rand index is used.

make.plot

If TRUE, make a plot of the dendogram formed by hierarchical clustering.

just.plot

If TRUE, just make the plot; don't return the inferred families. (In this case, the cutoff argument is not needed.)

Details

We use the function hclust to do the cluster analysis.

Value

A list of clusters; each component in the list is one inferred family, containing the indices of individuals placed in that family. The cutoff used is included as an attribute. Use attr(result,"cutoff") to obtain this value.

Author(s)

Karl W Broman broman@wisc.edu

References

BL Apostol, WC Black IV, BR Miller, P Reiter, BJ Beaty (1993) Estimation of the number of full sibling families at an oviposition site using RAPD-PCR markers: applications to the mosquito Aedes aegypti. Theor Appl Genet 86:991-1000.

See Also

cutoff, cutoff.llr, calc.dist, llrdist, cluster.stat, true.fams, freq, pull.markers

Examples

data(aedes)
f <- freq(aedes)
co <- cutoff(f)
d <- calc.dist(aedes)
fam <- fingers(d,co,make.plot=TRUE)
tf <- true.fams(aedes)
cluster.stat(fam,tf)

kbroman/fingers documentation built on May 17, 2023, 11:50 p.m.