This function is used to improve the quality of the hits found. It computes a regression line in the different samples ad uses the slope of this line to see the trend
filter_by_slope(
screenR_Object,
genes,
group_var_treatment,
group_var_control,
slope_control,
slope_treatment
)The ScreenR object obtained using the
create_screenr_object
The genes for which the slope as to be computed. Those genes are the result of the three statistical methods selection
The variable to use as independent variable (x) for the linear model of the treatment
The variable to use as independent variable (x) for the linear model of the the control
A value used as threshold for the control slope
A value used as threshold for the treatment slope
A data frame with the slope for the treatment and the control for each gene
object <- get0("object", envir = asNamespace("ScreenR"))
filter_by_slope(
screenR_Object = object, genes = c("Gene_1", "Gene_2"),
group_var_treatment = c("T1", "T2", "TRT"),
group_var_control = c("T1", "T2", "Time3", "Time4"),
slope_control = 0.5, slope_treatment = 1
)
#> # A tibble: 280 × 11
#> Barcode Gene Sample Frequency Sequence Library Gene_ID Day Treatment
#> <fct> <chr> <fct> <dbl> <lgl> <lgl> <lgl> <chr> <chr>
#> 1 10004 Gene_1 T1 54.7 NA NA NA T1 T1
#> 2 10004 Gene_1 T2 33.5 NA NA NA T2 T2
#> 3 10004 Gene_1 Time3_TRT_A 22.9 NA NA NA Time3 TRT
#> 4 10004 Gene_1 Time3_TRT_B 45.2 NA NA NA Time3 TRT
#> 5 10004 Gene_1 Time3_TRT_C 18.6 NA NA NA Time3 TRT
#> 6 10004 Gene_1 Time3_A 27.8 NA NA NA Time3 Time3
#> 7 10004 Gene_1 Time3_B 50.1 NA NA NA Time3 Time3
#> 8 10004 Gene_1 Time3_C 44.6 NA NA NA Time3 Time3
#> 9 10004 Gene_1 Time4_TRT_A 33.4 NA NA NA Time4 TRT
#> 10 10004 Gene_1 Time4_TRT_B 49.2 NA NA NA Time4 TRT
#> # … with 270 more rows, and 2 more variables: slope_treatment <dbl>,
#> # slope_control <dbl>