Learn R Programming

strvalidator (version 1.7.0)

removeArtefact: Remove Artefacts

Description

Remove artefact peaks from data.

Usage

removeArtefact(data, artefact = NULL, marker = NULL, allele = NULL, threshold = NULL, na.rm = FALSE, debug = FALSE)

Arguments

data
data.frame with data to remove spikes from.
artefact
data.frame that lists artefacts in columns 'Marker', 'Allele', optionally with 'Allele.Proportion'. Alternatively artefacts can be provided using 'marker' and 'allele'.
marker
character vector with marker names paired with values in 'allele'.
allele
character vector with allele names paired with values in 'marker'.
threshold
numeric value defining a minimum proportion for artefacts. Requires 'artefacts' including the column 'Allele.Proportion'.
na.rm
logical TRUE to preserve Allele=NA in 'data'.
debug
logical indicating printing debug information.

Value

data.frame with spikes removed.

Details

Removes identified artefacts from the dataset. Likely artefacts can be identified using the function calculateAllele. The output should then be provided to the 'artefact'. Alternatively known artefacts can be provided using the 'marker' and 'allele' arguments.