Description Usage Arguments Details Value Methods (by class) Grouping Grouped data frames (dplyr package)
View source: R/fun-flag_hits.R
Flag well as hit, depending on stringency.
1 2 3 4 5 6 7 8 9 10 |
x |
numeric vector or data frame |
... |
arguments passed to methods |
stringency |
numeric vector of length 1 or the same as |
vars |
variables to flag |
If the screen involves multiple replicates, hitscores should be aggregated and compared to a stringency threshold to determine whether a well is a hit. Stringency can be applied summarily (add all hit scores) or fractionally (divide the absolute sum of hit scores by the number of replicates). Each well receives a logical flag, marking the plate/well as a hit or not.
Thus, samples that receive positive as well as negative hitscores may not be flagged during aggregation.
Note that for the fractional method missing values are not counted towards the number of replicates.
For vector method, a named list containing the aggregated hitscore and the hit status.
For data frame method, a copy of x
with added columns.
numeric
: vector method
data.frame
: data frame method
Aggregates hitscores for each variable named in vars
.
Ads 2 columns to x
for each element of vars
:
one for the aggregate (numeric) and one for the hit status (logical).
grouped_df
: see data.frame__to__grouped_df
This function should be run on subsets of the screen object, i.e. either
on a grouped data frame or on a data table with the by
argument,
such that replicates are aggregated over plate/well combinations.
dplyr
package)The method for class grouped_df
is home made because the native behavior
of grouped data frames does not readily support functions that return data frames.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.