EstimateContaminationRate {polyRAD} | R Documentation |
Estimate Sample Contamination Using Blanks
Description
Based on mean read depth at blank and non-blank taxa, estimate sample
cross-contamination and add that information to the "RADdata"
object.
Usage
EstimateContaminationRate(object, ...)
## S3 method for class 'RADdata'
EstimateContaminationRate(object, multiplier = 1, ...)
Arguments
object |
A |
multiplier |
A single numeric value, or a named numeric vector with one value per blank
taxon in |
... |
Additional arguments (none implemented). |
Details
This function estimates sample cross-contamination assuming that the only
source of contamination is from adapter or sample spill-over between wells
during library preparation, or contamination among the libraries themselves.
If you anticipate a higher rate of contamination during DNA extraction before
library preparation, you may wish to increase the value using
SetContamRate
.
It is important to set the contamination rate to a reasonably accurate value (i.e. the right order of magnitude) in order for polyRAD to be able to identify homozygotes that may otherwise appear heterozygous due to contamination.
Value
A "RADdata"
object identical to object
but with the
"contamRate"
attribute adjusted.
Author(s)
Lindsay V. Clark
Examples
# dataset for this example
data(Msi01genes)
# give the name of the taxon that is blank
Msi01genes <- SetBlankTaxa(Msi01genes, "blank")
# Fifteen libraries were done; blank is pooled over all of them, and
# most other samples are pooled over two libraries.
mymult <- 2/15
# estimate the contamination rate
Msi01genes <- EstimateContaminationRate(Msi01genes, multiplier = mymult)