classify: Classifies normalised AFLP data

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/classify.R

Description

The normalised fluorescence score of AFLP data are converted into one or more classes. The classification is based on the first and second derivative of the density of the normalised fluorescence. Hence the data must be normalised prior to classification.

Usage

1
2
3
4
5
  classify(data, output = c("screen", "none", "tex"),
    maxBorder = 1, tresholdPeakRatio = 0.03,
    tresholdMonomorph = 0, tresholdMaxValley = 0.95,
    device = "pdf", path = NULL, nrows = 4, ncols = 4,
    keep.border = FALSE)

Arguments

data

A normalised AFLP object. Unnormalised object will be normalised prior to classification.

output

Indicates how the inspections plots should be given. "none" suppresses them, "screen" prints them on the screen, "tex" save them to a file and generates LaTeX to include these files into a document.

maxBorder

The maximum number of borders per marker.

tresholdPeakRatio

The minimum height of a potential peak in the density relative to the maximum density. Peak with a ratio lower that this threshold are not considered as peaks. Defaults to 0.03.

tresholdMonomorph

Calculate the ratio of 'absent' and 'present' bins in a marker. Consider the marker as monomorph if either of them is smaller than the threshold. Defaults to 0.

tresholdMaxValley

A treshold for valleys between peaks in the relative density. P,my vallyes below this treshold are considered for breaks. Defaults to 0.95.

path

the path where the figures are saved. Only used if output = "tex". Defaults to NULL, which is the working directory.

device

the device to which the figures are saved. See ggsave for the available devices. Only used if output = "tex". Defaults to "pdf".

nrows

Gives the prefer number of rows with plot per figure. Defaults to 4.

ncols

Gives the prefer number of columns with plot per figure. Defaults to 4.

keep.border

Logical. If FALSE then the borders are recalculated and overwritten. If TRUE the borders in the object are used for the classification. The latter is intended to update the classification after manually altering the borders. Default to FALSE.

Details

Monomorph markers will have only one class and the corresponding border with have Inf as cut-level. The lowest class in polymorphic markers is considered an 'absent' locus, all other classes indicate a 'present' locus.

We strongly suggest that the user thoroughly inspects the resulting plots as the automated classification might yield some unwanted artifacts. Correct them with the link{border<-} function.

Value

Returns the data object with a updated borders slot and updated Score in the Fluorescence slot.

Author(s)

Thierry Onkelinx Thierry.Onkelinx@inbo.be, Paul Quataert

See Also

border<-, border, normalise, ggsave

Examples

1
2
data(Tilia)
 Tilia <- classify(Tilia, output = "none")

AFLP documentation built on May 2, 2019, 6:13 p.m.