randomiseCapilar: Randomise specimens over different capilar AFLP plates.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/randomiseCapilar.R

Description

This function randomises Specimens over the required number of plates depending on the size of the plates, the minimum ratio of replications and the number of quality control specimens per plate.

Usage

1
2
3
4
  randomiseCapilar(Specimens, Group, FirstLabID = 1,
    Prefix = "", nCapilar = 8, nLines = 12, QC,
    rReplicates = 0.1, minReplicates = 8,
    fillPlate = FALSE)

Arguments

Specimens

Either the number of specimens or a vector with the names of the specimens.

Group

A vector indication the a priori clustering of specimens. Must be as long as the number of specimens and in the same order. When missing, no a priori clustering is assumed. Defaults to NULL.

FirstLabID

Start the replicate numbering at this number. Defaults to 1.

Prefix

Optional prefix for the replicate names. Defaults to "".

nCapilar

Number of available capilars. Defaults to 8.

nLines

Number of available lines on a plate. Defaults to 12.

QC

A data.frame with the positions of the quality control samples. See the examples.

rReplicates

Percentage of the samples that are reserved for replicates. Default = 0.1 (10%).

minReplicates

Minimum number of samples reserved for replicates. Defaults to 8. Only relevant when the number of specimens is very low.

fillPlate

If TRUE, all plates will be filled with samples. If needed, extra specimens are replicated. If FALSE, only the lines will be filled. Possibly leaves one or more lines on the last plate without samples. Defaults to TRUE.

Value

Results in an AFLP object with randomised replicates.

Author(s)

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

See Also

as.AFLP, normalise

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
randomiseCapilar(100)

	#example with quality control samples
	QCsamples <- data.frame(
   Capilar = c("E", "F"),
   Line = c(5, 5),
   ID = c("BL", "QCmethod"),
   Type = c("Blanco","QC")
 )
	nSpecimens <- 180
	Group <- sample(10, nSpecimens, replace = TRUE)
	randomiseCapilar(nSpecimens, Group,
   FirstLabID = 626, Prefix = "C/11/", QC = QCsamples)

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