Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/filter.ampliconduo.R
Marks or removes amplicons from an ampliconduo data frame according to the specified filter criteria.
1 |
x |
Data frame, an ampliconduo data frame returned by the |
min.freq |
Optional. Integer, minimium frequency/read count for an amplicon in each of the two amplicon sets to be retained. Default value is 1. |
OR |
Optional. Numeric, minimum odds ratio for an amplicon to be retained. If no value is specified the odds ratio is excluded from the filter criteria. |
q |
Optional. Numeric, minimum value for |
p |
Optional. Numeric, minimum p-value for an amplicon to pass the filter. If no value for |
remove |
Optional. Logical, decides whether amplicons that fail the filter criteria should be removed ( |
Takes the ampliconduo data frame x and applies each filter criterion that is selected to each amplicon.
If an amplicon i does not pass each of the applied criteria, the logical value in column rejected in row i is set to TRUE.
In case the parameter remove was set to TRUE, all amplicons with rejected = TRUE are removed. The position information with respect to the data used as input for the ampliconduo call is retained.
Data frame corresponding to the input x, but with the adjustments in the rejected column according to the specified filter criteria, or removed rows (removed = TRUE).
Anja Lange & Daniel Hoffmann
ampliconduo, generates the input data x for this method.
accepted.amplicons, returns the indices of amplicons that
have passed the filter criteria.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ##load example data
data(amplicons)
## extract the first ampliconduo data frame
ampliconduo1 <- amplicons[[1]]
## apply filter criteria
ampliconduo1.f <- filter.ampliconduo(ampliconduo1)
ampliconduo1.f <- filter.ampliconduo(ampliconduo1, min.freq = 2, remove = TRUE)
## to return a list with the indices (corresponding to the indices of the data
## the ampliconduo function was called on) of all amplicons that passed the filter criteria
good.reads <- accepted.amplicons(ampliconduo1.f)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.