calculateConcordance {strvalidator} | R Documentation |
Calculate Concordance.
Description
Calculates concordance and discordance for profiles in multiple datasets.
Usage
calculateConcordance(
data,
kit.name = NA,
no.marker = "NO MARKER",
no.sample = "NO SAMPLE",
delimeter = ",",
list.all = FALSE,
debug = FALSE
)
Arguments
data |
list of data frames in 'slim' format with at least columns 'Sample.Name', 'Marker', and 'Allele'. |
kit.name |
character vector for DNA typing kit names in same order and of same lengths as data sets in 'data' list. Default is NA in which case they will be numbered. |
no.marker |
character vector for string when marker is missing. |
no.sample |
character vector for string when sample is missing. |
delimeter |
character to separate the alleles in a genotype. Default is comma e.g '12,16'. |
list.all |
logical TRUE to return missing samples. |
debug |
logical indicating printing debug information. |
Details
Takes a list of datasets as input. It is assumed that each unique sample name represent a result originating from the same source DNA and thus is expected to give identical DNA profiles. The function first compare the profiles for each sample across datasets and lists discordant results. Then it performs a pair-wise comparison and compiles a concordance table. The tables are returned as two data frames in a list. NB! Typing and PCR artefacts (spikes, off-ladder peaks, stutters etc.) must be removed before analysis. NB! It is expected that the unique set of marker names across a dataset is present in each sample for that dataset (a missing marker is a discordance).
Value
list of data.frames (discordance table, and pair-wise comparison).