Contents

1 Introduction

Pooled CRISPR perturbations screens employ a library of guide RNAs (gRNAs) that is transduced into a pool of cells with the aim to induce a single genetic perturbation in each cell. The perturbation effect is assessed by measuring the abundance of each gRNA after the screen selection phase and comparing it to its abundance in the plasmid library. The main goal of the following analysis is the detection of essential genes, i.e. genes whose knockout reduces the cell fitness. The package gscreend provides a method to rank genes based on count tables.

2 gscreend workflow

In order to identify essential genes starting from raw gRNA count data, gscreend performs the following analysis steps:

  1. Input of raw gRNA counts at T0 (sequencing of library) and T1 (at the end of the screen). Normalization and calculation of log fold changes.

  2. Split log fold changes into intervals dependent on the initial count at T0.

  3. For every interval fit a skew-normal distribution to the data to model the null hypothesis (via least quantile regression).

  4. Based on the null model calculate p-values for every gRNA.

  5. Rank gRNAs according to p-value and perform robust ranking aggregation to calculate p-values on gene level.

  6. Perform quality control of data and statistical model.

3 Installation

if(!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("gscreend")
library(gscreend)
library(SummarizedExperiment)

4 Analysis of simulated data with gscreend

4.1 Input data: gRNA counts

The simulated data used in this example has been generated using the simulation method available at https://github.com/imkeller/simulate_pooled_screen

Raw count data consists of gRNA counts in the library sequencing and different replicates after the screen proliferation phase. In order to estimate the effect of a specific gRNA on cell fitness, the relative abundances of the gRNA before and after the proliferation phase will be compares

raw_counts <- read.table(
    system.file("extdata", "simulated_counts.txt", package = "gscreend"),
    header=TRUE)

Generate a summarized experiment from the count data. gscreend currently uses SummarizedExperiment objects as an input format.

The count matrix contains raw gRNA counts. Each row represents one gRNA, each column represents one sample (T0, T1, replicates, …).

counts_matrix <- cbind(raw_counts$library0, 
                        raw_counts$R0_0, 
                        raw_counts$R1_0)

rowData <- data.frame(sgRNA_id = raw_counts$sgrna_id,
                    gene = raw_counts$Gene)

colData <- data.frame(samplename = c("library", "R1", "R2"),
                    # timepoint naming convention: 
                    # T0 -> reference, 
                    # T1 -> after proliferation
                    timepoint = c("T0", "T1", "T1"))

se <- SummarizedExperiment(assays=list(counts=counts_matrix),
                    rowData=rowData, colData=colData)

4.2 Run gscreend

In this step a gscreend experiment object is generated that will after the analysis contain all data related to gRNAs, genes and model parameters.

pse <- createPoolScreenExp(se)
## Creating PoolScreenExp object from a SummarizedExperiment object.
## References and samples are named correctly.
## Data concerning sgRNA and genes is provided.

Run gscreend with default parameters.

pse_an <- RunGscreend(pse)
## Size normalized count data.
## Calculated LFC.
## Fitted null distribution.
## Calculated p-values at gRNA level.
## Ranking genes...
## ... for positive fold changes
## ... for negative fold changes
## gscreend analysis has been completed.

4.3 Quality control

gscreend provides basic quality control functions for inspection of replicate correlation for example.

plotReplicateCorrelation(pse_an)

The plotModelParameters() function can be used to inspect the values of the parameters estimated for the skew normal distribution of the logarithmic fold change data.

plotModelParameters(pse_an) 

5 Results

The ResultsTable function can be used to extract a table listing for each gene the p-value and fdr. These values correspond to the results from the statistical test indicting whether upon perturbation a specific gene reduces (direction = “negative”), or increasing (direction = “positive”) cell viability.

res <- ResultsTable(pse_an, direction = "negative")
head(res)
##                          Name          fdr    pval       lfc
## essential_0       essential_0 0.0004612546 0.00003 -1.421372
## essential_1       essential_1 0.0000000000 0.00000 -1.984253
## essential_10     essential_10 0.0003192848 0.00002 -1.605037
## essential_100   essential_100 0.0000000000 0.00000 -3.075151
## essential_1000 essential_1000 0.0000000000 0.00000 -2.023614
## essential_1001 essential_1001 0.0557174888 0.00497 -1.032688

6 Session Info

sessionInfo()
## R version 4.4.0 RC (2024-04-16 r86468)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 22.04.4 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.20-bioc/R/lib/libRblas.so 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_GB              LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: America/New_York
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] SummarizedExperiment_1.35.0 Biobase_2.65.0             
##  [3] GenomicRanges_1.57.0        GenomeInfoDb_1.41.0        
##  [5] IRanges_2.39.0              S4Vectors_0.43.0           
##  [7] BiocGenerics_0.51.0         MatrixGenerics_1.17.0      
##  [9] matrixStats_1.3.0           gscreend_1.19.0            
## [11] BiocStyle_2.33.0           
## 
## loaded via a namespace (and not attached):
##  [1] sass_0.4.9              SparseArray_1.5.0       fGarch_4033.92         
##  [4] lattice_0.22-6          magrittr_2.0.3          digest_0.6.35          
##  [7] evaluate_0.23           grid_4.4.0              bookdown_0.39          
## [10] fastmap_1.1.1           jsonlite_1.8.8          Matrix_1.7-0           
## [13] tinytex_0.50            BiocManager_1.30.22     httr_1.4.7             
## [16] UCSC.utils_1.1.0        gbutils_0.5             codetools_0.2-20       
## [19] jquerylib_0.1.4         abind_1.4-5             Rdpack_2.6             
## [22] cli_3.6.2               timeSeries_4032.109     rlang_1.1.3            
## [25] crayon_1.5.2            rbibutils_2.2.16        XVector_0.45.0         
## [28] cachem_1.0.8            DelayedArray_0.31.0     yaml_2.3.8             
## [31] S4Arrays_1.5.0          cvar_0.5                parallel_4.4.0         
## [34] tools_4.4.0             BiocParallel_1.39.0     nloptr_2.0.3           
## [37] GenomeInfoDbData_1.2.12 R6_2.5.1                magick_2.8.3           
## [40] lifecycle_1.0.4         zlibbioc_1.51.0         bslib_0.7.0            
## [43] Rcpp_1.0.12             highr_0.10              xfun_0.43              
## [46] knitr_1.46              spatial_7.3-17          htmltools_0.5.8.1      
## [49] fBasics_4032.96         rmarkdown_2.26          timeDate_4032.109      
## [52] compiler_4.4.0