Compare DNA profiles

dbCompare(
  x,
  profiles = NULL,
  hit = 7,
  trace = TRUE,
  vector = FALSE,
  collapse = FALSE,
  wildcard = FALSE,
  wildcard.effect = FALSE,
  wildcard.impose = FALSE,
  Rallele = FALSE,
  threads = 2
)

Arguments

x

Database with DNA profiles. The database format is expected to be a data frame with each column containing an allelic number such that for each DNA marker there are two columns in the data frame. See data(dbExample) for an example of the format.

profiles

One or more profiles to be compared with all profiles in the database. Input is a vector, matrix or data frame of same length/width as a row in the database x. If profiles is non-null only one CPU will be used. In case threads>1 a warning will be given but computations performed using single core.

hit

The number of matching loci for further investigation

trace

Shows a progress bar

vector

Logical. Whether the result should be returned as vector or a matrix. Note if 'collapse' is TRUE vector is ignored.

collapse

Logical (default FALSE). If TRUE the (m,p)-matrix will be collapased into a (2*m+p)-vector containing the total number of matching alleles.

wildcard

Use the wildcard comparing.

wildcard.effect

Compare result of wildcard and no wildcard.

wildcard.impose

Force homozygouse profiles (aa) to have wildcard (aF).

Rallele

Implementation of 'Rare allele'designation matching.

threads

The number of threads to use for performing comparisons in parallel for increased computation time. Use 0 for using the same number as the computer has CPU cores. NOTE: Only available on Linux and MacOS operating systems.

Value

Returns a matrix with the number of pairs mathcing/partially-matching at (i,j)-loci.

Details

Computes the distance between DNA profiles in terms of matching and partially-matching STR loci.

Examples

if (FALSE) { data(dbExample) dbCompare(dbExample,hit=5,trace=TRUE) }