RFLPdist2ref {RFLPtools} | R Documentation |
Compute distance between RFLP data and RFLP reference data.
Description
Function to compute distance between RFLP data and RFLP reference data.
Usage
RFLPdist2ref(x, ref, distfun = dist, nrBands, LOD = 0)
Arguments
x |
data.frame with RFLP data; e.g. |
ref |
data.frame with RFLP reference data; e.g. |
distfun |
function computing the distance with default |
nrBands |
only samples and reference samples with this number of bands are considered. |
LOD |
threshold for low-bp bands. |
Details
For each sample with nrBands
bands the distance to each reference
sample with nrBands
bands is computed. The result is a matrix with
the corresponding distances where rows represent the samples and columns
the reference samples.
If LOD > 0
is specified, all values below LOD
are removed before the
distances are calculated. This applies to x
and ref
.
Value
A matrix with distances.
Author(s)
Fabienne Flessa Fabienne.Flessa@uni-bayreuth.de,
Alexandra Kehl Alexandra.Kehl@uni-tuebingen.de,
Matthias Kohl Matthias.Kohl@stamats.de
References
Flessa, F., Kehl, A., Kohl, M. Analysing diversity and community structures using PCR-RFLP: a new software application. Molecular Ecology Resources 2013 Jul; 13(4):726-33.
See Also
Examples
## Euclidean distance
data(RFLPdata)
data(RFLPref)
nrBands(RFLPref)
RFLPdist2ref(RFLPdata, RFLPref, nrBands = 4)
RFLPdist2ref(RFLPdata, RFLPref, nrBands = 6)
Dir <- system.file("extdata", package = "RFLPtools") # input directory
filename <- file.path(Dir, "AZ091016_report.txt")
RFLP1 <- read.rflp(file = filename)
RFLP2 <- RFLPqc(RFLP1)
nrBands(RFLP2)
RFLPdist2ref(RFLP1, RFLPref, nrBands = 4)
RFLPdist2ref(RFLP1, RFLPref, nrBands = 5)