This function implements the method by proposed by Wu and
Smyth (2012).
The original camera method is a gene set
test, here is applied in the contest of a genetic screening
and so it erforms a competitive barcode set test.
The paper can be found here
CAMERA
find_camera_hit(
screenR_Object,
matrix_model,
contrast,
number_barcode = 3,
thresh = 1e-04,
lfc = 1,
direction = "Down"
)The ScreenR object obtained using the
create_screenr_object
The matrix that will be used to perform the
linear model analysis created using
model.matrix
A vector or a single value indicating the index or the name of the column the model_matrix with which perform the analysis
Number of barcode that as to be differentially expressed (DE)in order to consider the gene associated DE. Example a gene is associated with 10 shRNA we consider a gene DE if it has at least number_barcode = 5 shRNA DE.
The threshold for the False Discovery Rate (FDR) that has to be used to select the statistically significant hits.
The Log2FC threshold.
String containing the direction of the variation, "Down" for the down regulation "Up" for the up regulation.
The data frame containing the hit found using the camera method
object <- get0("object", envir = asNamespace("ScreenR"))
matrix <- model.matrix(~ slot(object, "groups"))
colnames(matrix) <- c("Control", "T1/T2", "Treated")
result <- find_camera_hit(
screenR_Object = object,
matrix_model = matrix, contrast = "Treated"
)
#> Warning: 3rows with all zero counts
#> Warning: Zero sample variances detected, have been offset away from zero
head(result)
#> # A tibble: 6 × 5
#> Gene NGenes Direction PValue FDR
#> <chr> <dbl> <fct> <dbl> <dbl>
#> 1 Gene_173 10 Down 0.0000286 0.0153
#> 2 Gene_15 10 Down 0.00371 0.372
#> 3 Gene_352 10 Down 0.00779 0.485
#> 4 Gene_121 10 Down 0.0111 0.533
#> 5 Gene_422 10 Down 0.0128 0.533
#> 6 Gene_377 10 Down 0.0129 0.533