isNotContaminant {decontam} | R Documentation |
The prevalence of each sequence (or OTU) in the input feature table across samples and negative controls is used to identify non-contaminant sequences. Note that the null hypothesis here is that sequences **are** contaminants. This function is intended for use on low-biomass samples in which a large proportion of the sequences are likely to be contaminants.
isNotContaminant(seqtab, neg = NULL, method = "prevalence", threshold = 0.5, normalize = TRUE, detailed = FALSE)
seqtab |
(Required). Integer matrix. A feature table recording the observed abundances of each sequence (or OTU) in each sample. Rows should correspond to samples, and columns to sequences (or OTUs). |
neg |
(Required). |
method |
(Optional). Default "prevalence". The method used to test for contaminants. Currently the only method supported is prevalence. prevalence: Contaminants are identified by increased prevalence in negative controls. |
threshold |
(Optional). Default |
normalize |
(Optional). Default TRUE.
If TRUE, the input |
detailed |
(Optional). Default FALSE.
If TRUE, the return value is a |
If detailed=FALSE
a logical
vector is returned, with TRUE indicating non-contaminants.
If detailed=TRUE
a data.frame
is returned instead.
st <- readRDS(system.file("extdata", "st.rds", package="decontam")) samdf <- readRDS(system.file("extdata", "samdf.rds", package="decontam")) isNotContaminant(st, samdf$quant_reading, threshold=0.05)