Description Usage Arguments Value Author(s)
View source: R/remove_false_pos.R
Removes suspected false positives from a data frame of numbers of reads from machine fragments of DNA that match each species in each sample.
1 | remove_false_pos(data, aT = 4, category = FALSE, alpha = 0.2, ...)
|
data |
A tibble (table data frame, using dplyr) consisting of each row representing a sample with values indicating the number of reads of each species, with species represented by columns. The first row represents a mock sample and remaining rows are real samples. The first column must be called Sample and gives the name of the samples (mock sample must be called 'mock'), next column is the category (if category == TRUE) which gets removed for this function, next aT columns are reads of control species, and the remaining columns are reads of non-control species. |
aT |
Total number of control species. |
category |
TRUE if second column is a category column, FALSE if there is no category column. |
alpha |
Tolerance for keeping potential false positive reads to preserve detection of rare species. A number of reads is only declared to be a false positive if it is less than 'alpha' proportion of the maximum number of reads of that species across all samples. Must satisfy 0 < alpha <= 1. With alpha = 1 there is no consideration of rare species. |
... |
Additional arguments. |
A tibble with susepcted false positive reads set to 0.
Andrew Edwards
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.