Learn R Programming

NAM (version 1.5.3)

Duplicates: Manage Duplicated Genotypes

Description

Identify and merge duplicate genotypes

Usage

cleanREP(y,gen,fam=NULL,thr=0.95)

Arguments

y

Numeric vector (\(n\)) or numeric matrix (\(n\) x \(t\)) of observations describing the trait to be analyzed. NA is allowed.

gen

Numeric matrix containing the genotypic data. A matrix with \(n\) rows of observations and (\(m\)) columns of molecular markers. SNPs must be coded as 0, 1, 2, for founder homozygous, heterozygous and reference homozigous. NA not allowed.

fam

Numeric vector of length (\(n\)) indicating which subpopulations (\(i.e.\) family) each observation comes from. Default assumes that all observations are from the same populations.

thr

Threshold above which genotypes are considered identical. Default is 0.95, merging genotypes >95 percent identical.

Value

List containing the inputs without replicates. Groups of replicates are replaced by a single observation with the phenotypic expected value. The algorithm keeps the genotypic information of the first individual (genotypic matrix order).

Details

The algorithm start from generating a genomic identity matrix (IBS), with pairwise percentage of identical loci among individuals. Individuals above the threshold have the phenotypes merged while keeping only one genotype.

Examples

Run this code
# NOT RUN {
data(tpod)
test = cleanREP(y,gen)
# }

Run the code above in your browser using DataLab