strataG (version 2.4.905)

dupGenotypes: Duplicate Genotypes

Description

Identify duplicate or very similar genotypes.

Usage

dupGenotypes(g, num.shared = 0.8)

Arguments

g

a '>gtypes object.

num.shared

either number of loci or percentage of loci two individuals must share to be considered duplicate individuals.

Value

if no duplicates are present, the result is NULL, otherwise a data frame with the following columns is returned:

ids.1, ids.2 sample ids.
strata.1, strata.2 sample stratification.
mismatch.loci loci where the two samples do not match.
num.loci.genotyped number of loci genotyped for both samples.
num.loci.shared number of loci shared (all alleles the same) between both samples.
prop.loci.shared proportion of loci genotyped for both samples that are shared.

Examples

Run this code
# NOT RUN {
data(msats.g)

# identify potential duplicates in Coastal strata
coastal <- msats.g[, , "Coastal"]
coastal.5 <- coastal[getIndNames(coastal)[1:5], , ]
dupes <- dupGenotypes(coastal.5)
dupes

# }

Run the code above in your browser using DataCamp Workspace