Learn R Programming

GWASTools (version 1.18.0)

pedigreeDeleteDuplicates: Remove duplicates from a pedigree

Description

pedigreeDeleteDuplicates removes duplicates from a pedigree.

Usage

pedigreeDeleteDuplicates(pedigree, duplicates)

Arguments

pedigree
A dataframe containing the pedigree information for the samples to be examined with columns labeled "family", "individ", "mother", "father" and "sex" containing the identifiers of the family, individual, individual's mother, individual's father and individual's sex (coded as "M" or "F") .
duplicates
dataframe with columns "family" (family id) and "individ" (individual id).

Value

The output of pedigreeDeleteDuplicates is a pedigree identical to pedigree, but with duplicates removed.

Details

The output of pedigreeCheck can be provided to pedigreeDeleteDuplicates in order to generate a new pedigree with duplicates removed.

See Also

pedigreeCheck, pedigreePairwiseRelatedness

Examples

Run this code
family <- c(1,1,1,1,2,2,2,2)
individ <- c(1,2,3,3,4,5,6,6)
mother <- c(0,0,1,1,0,0,4,4)
father <- c(0,0,2,2,0,0,5,5)
sex <- c("F","M","F","F","F","F","M","M")
pedigree <- data.frame(family, individ, mother, father, sex, stringsAsFactors=FALSE)
duplicates <- pedigreeCheck(pedigree)$duplicates
pedigree.no.dups <- pedigreeDeleteDuplicates(pedigree, duplicates) 

Run the code above in your browser using DataLab