Browse code

to LOWERCASE

Emanuel Soda authored on 13/05/2022 18:26:15
Showing1 changed files

1 1
deleted file mode 100644
... ...
@@ -1,50 +0,0 @@
1
-#' @title Create the ScreenR Object
2
-#' @description Initial function to create the Screen Object.
3
-#' @param table The count table obtained from the read alignment that
4
-#'                    contains the Barcodes as rows and samples as columns.
5
-#' @param annotation The annotation table containing the information
6
-#'                        for each Barcode and the association to the
7
-#'                        corresponding Gene
8
-#' @param groups A factor containing the experimental design label
9
-#' @param replicates A vector containing the replicates label
10
-#' @importFrom rlang .data
11
-#' @importFrom methods new
12
-#' @concept objects
13
-#' @return An object containing all the needed information for the analysis.
14
-#' @export
15
-#' @examples
16
-#' count_table <-
17
-#'     data.frame(
18
-#'         Barcode = c("Code_1", "Code_2", "Code_3", "Code_3"),
19
-#'         Time_3_rep1 = c("3520", "3020", "1507", "1400"),
20
-#'         Time_3_rep2 = c("3500", "3000", "1457", "1490"),
21
-#'         Time_3_TRT_rep1 = c("1200", "1100", "1300", "1350"),
22
-#'         Time_3_TRT_rep2 = c("1250", "1000", "1400", "1375")
23
-#'     )
24
-#' annotation_table <-
25
-#'     data.frame(
26
-#'         Gene = c("Gene_1", "Gene_1", "Code_2", "Code_2"),
27
-#'         Barcode = c("Code_1", "Code_2", "Code_3", "Code_3"),
28
-#'         Gene_ID = rep(NA, 4), Sequence = rep(NA, 4),
29
-#'         Library = rep(NA, 4)
30
-#'     )
31
-#'
32
-#' groups <- factor(c("Control", "Control", "Treated", "Treated"))
33
-#' obj <- create_screenr_object(
34
-#'     table = count_table,
35
-#'     annotation = annotation_table,
36
-#'     groups = groups, replicates = c("")
37
-#' )
38
-#' obj
39
-create_screenr_object <- function(table = NULL, annotation = NULL,
40
-    groups = NULL, replicates = c("")) {
41
-    # arcode <- as.factor(table$Barcode)
42
-    annotation$Barcode <- as.factor(annotation$Barcode)
43
-    object <- methods::new("screenr_object",
44
-        count_table = tibble(table),
45
-        annotation_table = tibble(annotation), groups = groups,
46
-        replicates = replicates, normalized_count_table = tibble(),
47
-        data_table = tibble()
48
-    )
49
-    return(object)
50
-}