Learn R Programming

strvalidator (version 1.7.0)

filterProfile: Filter Profile

Description

Filter peaks from profiles.

Usage

filterProfile(data, ref, add.missing.loci = FALSE, keep.na = FALSE, ignore.case = TRUE, exact = FALSE, invert = FALSE, debug = FALSE)

Arguments

data
data frame with genotype data in 'slim' format.
ref
data frame with reference profile in 'slim' format.
add.missing.loci
logical. TRUE add loci present in ref but not in data. Overrides keep.na=FALSE.
keep.na
logical. FALSE discards NA alleles. TRUE keep loci/sample even if no matching allele.
ignore.case
logical TRUE ignore case.
exact
logical TRUE use exact matching of sample names.
invert
logical TRUE filter peaks NOT matching the reference.
debug
logical indicating printing debug information.

Value

data.frame with extracted result.

Details

Filters out the peaks matching (or not matching) specified known profiles from typing data containing 'noise' such as stutters. If 'ref' does not contain a 'Sample.Name' column it will be used as reference for all samples in 'data'. The 'invert' option filters out peaks NOT matching the reference (e.g. drop-in peaks). NB! add.missing.loci overrides keep.na. Returns data where allele names match/not match 'ref' allele names. Required columns are: 'Sample.Name', 'Marker', and 'Allele'.