Skip to content

Commit

Permalink
We want mean_observed_cs saved too
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy committed Dec 19, 2024
1 parent e726903 commit 1c9c2ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/06-calculate_gi.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ calc_gi <- function(.data = NULL,
dplyr::group_by(rep,
pgRNA_target) %>%
dplyr::summarize(mean_expected_cs = mean(expected_double_crispr, na.rm = TRUE),
mean_observed_cs = mean(double_crispr, na.rm = TRUE),
mean_gi_score = mean(double_gi_score, na.rm = TRUE)) %>%
# Collapse to just stats and don't care about pg_ids anymore
dplyr::select(rep,
pgRNA_target,
mean_expected_cs,
mean_observed_cs,
mean_gi_score) %>%
dplyr::mutate(target_type = "gene_gene") %>%
dplyr::distinct()
Expand All @@ -135,6 +137,7 @@ calc_gi <- function(.data = NULL,
dplyr::group_by(rep,
pgRNA_target) %>%
dplyr::summarize(mean_expected_cs = mean(expected_single_crispr, na.rm = TRUE),
mean_observed_cs = mean(single_crispr, na.rm = TRUE),
mean_gi_score = mean(single_gi_score, na.rm = TRUE)) %>%
dplyr::mutate(target_type = dplyr::case_when(
grepl("^ctrl_*", pgRNA_target) ~"ctrl_gene",
Expand All @@ -144,6 +147,7 @@ calc_gi <- function(.data = NULL,
target_type,
pgRNA_target,
mean_expected_cs,
mean_observed_cs,
mean_gi_score) %>%
dplyr::distinct()

Expand Down

0 comments on commit 1c9c2ab

Please sign in to comment.