Skip to content

Commit

Permalink
add beginning of GI review
Browse files Browse the repository at this point in the history
  • Loading branch information
kweav committed Jul 30, 2024
1 parent 04413b5 commit 75831be
Show file tree
Hide file tree
Showing 2 changed files with 585 additions and 0 deletions.
77 changes: 77 additions & 0 deletions inst/rmd/scratch_gimap_GI_review.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: "scratch gimap Genetic Interaction Review"
output: html_document
date: "`r Sys.Date()`"
---

```{r warning=FALSE, message=FALSE}
library(tidyverse)
library(devtools)
devtools::load_all()
```

## Get the gimap GI results

```{r}
gimap_dataset <- get_example_data("gimap") %>%
gimap_filter() %>%
gimap_annotate() %>%
gimap_normalize(
timepoints = "day",
replicates = "rep") %>%
calc_crispr() %>%
calc_gi()
```

## Load the GI Mapping GI results

```{r}
old_gi_results <- readRDS("~/Downloads/results/calculate_GI_scores/tables/rds/d.HeLa_GI_scores_target")
```

## Compare results

### Columns

```{r}
colnames(gimap_dataset$gi_scores)
colnames(old_gi_results)
```

Looks like we want to compare the pgRNA targets which should be the `pgRNA_target_double` column for the gimap results and the `pgRNA_target` column for the GI Mapping results

Columns in the GI Mapping results not in the gimap results seem to include model results (`intercept`, `slope`) as well as some significance values (`p_val`, `fdr`), observed and expected CRISPR score (`mean_observed_CS` and `mean_expected_CS` (which I think I need for plotting)). And how does `mean_GI_score` relate to the three GI score columns in the gimap results?

### Target overlap

```{r}
length(unique(old_gi_results$pgRNA_target))
length(unique(gimap_dataset$gi_scores$pgRNA_target_double))
length(intersect(unique(old_gi_results$pgRNA_target), unique(gimap_dataset$gi_scores$pgRNA_target_double)))
```

Only 1/3 of the GI Mapping targets are represented in the gimap results

### Number of observations/rows total and rep column overlap

```{r}
nrow(old_gi_results)
nrow(gimap_dataset$gi_scores)
```

The gimap results has far more rows

```{r}
table(old_gi_results$rep)
table(gimap_dataset$gi_scores$rep)
```

While the replicate values themselves can be synced like we've done in other reviews, this further shows the far greater number of observations (even if there are fewer represented pgRNA targets) in the gimap results

```{r}
head(old_gi_results)
```

508 changes: 508 additions & 0 deletions inst/rmd/scratch_gimap_GI_review.html

Large diffs are not rendered by default.

0 comments on commit 75831be

Please sign in to comment.