redoPlateMap: Plate samples for redos

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

Description

Plate samples for redos with a constraint on the number of original plates from which each original plate is drawn.

Usage

1
2
redoPlateMap(sample.data, n.orig.plates=24,
             batch.size=48, batches.per.plate=2, duplicates=NULL, ...)

Arguments

sample.data

A data.frame with sample data, including "SampleID," "Orig.Plate", and as many other columns as there are categories on which to stratify the plate maps. An optional column called "Reserve" is a logical variable for samples that should be distributed evenly across plates outside of stratification (such as cross-study duplicates or WGA samples). If families should be plated together, give family ID in column "Family."

n.orig.plates

Maximum number of original plates from which samples on a new plate can be drawn.

batch.size

Size of each batch of samples on the new plate. Can be useful to make this half a plate if there are many original plates.

batches.per.plate

Number of batches on each new plate.

duplicates

data frame of duplicate pairs

...

Other arguments passed to plateMap.

Details

Randomly selects n.orig.plates original plates and runs plateMap with the given batch.size. Repeats until all samples have been assigned to new plates.

Value

A data frame with the contents of sample.data as well as new columns "Batch", "Well", and "Plate".

Author(s)

Stephanie M. Gogarten

See Also

plateMap

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## make original plate map
head(plate.data)
head(sample.data)
head(duplicate.data)
sample.data <- sample.data[,c("SampleID", "Group", "Sex")]
map <- plateMap(sample.data, plate.data, duplicate.data, debug=TRUE)
tmp <- merge(map, sample.data)
table(tmp$Plate, paste(tmp$Sex, tmp$Group, sep="."))

## select some samples as redos
redo <- tmp[sample(1:nrow(tmp), 100), c("SampleID", "Plate", "Group")]
names(redo)[2] <- "Orig.Plate"
map2 <- redoPlateMap(redo)

smgogarten/PlateMap documentation built on May 30, 2019, 5:02 a.m.