locus.dist: Generate a pairwise similarity matrix for individuals based...

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

View source: R/locus.dist.R

Description

This function returns a pairwise similarity matrix based on how many loci or the proportion of loci shared between individuals.

Usage

1
locus.dist(pyIn, proportional = TRUE, upper = TRUE, diagonal = TRUE)

Arguments

pyIn

an object of class pyRAD.loci

proportional

set to TRUE for a proportional similarity (scaled from 0 to 1), FALSE for absolute number of loci shared

upper

set to TRUE for a symmetrical matrix, FALSE for a lower-only matrix

diagonal

set to TRUE to get the number (or percentage) of total loci reported for each individual

Details

Under the proportional = TRUE option, this function normalizes based on all loci in the dataset. Thus, two individuals that share 100 have sequences for only 90 0.9 instead of 1.0.

Value

A square matrix with individuals as the rows and columns, and proportions or whole numbers in the cells

Author(s)

Andrew Hipp

See Also

plot.locus.dist

Examples

1
2
3
4
5
6
	data(oak.rads)
	temp <- locus.dist(oak.rads, proportional = TRUE)
	diag(temp) # this is how well everyone sequenced as a proportion
	temp <- locus.dist(oak.rads, proportional = FALSE)
	temp[c(1,28),]# how well did a successful sequencing do in comparison to a poor sequencing?
	temp[6:7,] # ... and 2010 sequencing (upper row) vs. 2012 sequencing of the same library?

RADami documentation built on May 30, 2017, 8:23 a.m.