ct.CAT: Compare Two CRISPR Screens via a CAT plot

View source: R/generateCAT.R

ct.CATR Documentation

Compare Two CRISPR Screens via a CAT plot

Description

This is a function for comparing the results of two screening experiments. Given two summaryDF, the function places them in register with one another, generates a Concordance At The Top (CAT) plot, and returns an invisible dataframe containing the relevant gene-level signals. Signals are aggregated by P-value threshold, such that the concordance is represented as the portion of shared values meeting or exceeding that significance threshold.

This function is conceptually similar to the 'ct.ROC' and 'ct.PRC()' functions, but is appropriate when considering consistency of ranked values rather than an interchangeable set; the most common use case is for comparing primary and replication screens, where the underlying technology and selection criteria are expected to be highly similar. CAT plots are fundamentally about comparing rankings, and so only targets in common between the two provided screens are considered. If the totality of list overlap is important, consider using 'ct.PRC()' or 'ct.ROC()'.

Usage

ct.CAT(
  dflist,
  targets = c("geneSymbol", "geneID"),
  switch.dir = FALSE,
  plot.it = TRUE
)

Arguments

dflist

A list of results dataframes. Names will be preserved, and the enrichment calculation is conditioned on the first element of the list.

targets

Column of the provided summaryDF to consider. Must be geneID or geneSymbol.

switch.dir

Logical indicating whether to test overlap of signals in the same direction, or whether the directionality is expected to reverse. 'same.dir = FALSE' looks at the consistency between depleted signals in 'df1' and enriched signals in 'df2'.

plot.it

Logical indicating whether to compose the plots on the default device. Two CAT plots summarizing overlap in both enrichment directions are drawn.

Value

Invisibly, a data.frame containing the relevant summary stats for each target in both screens.

Author(s)

Russell Bainer

Examples

data('resultsDF')
cat <- ct.CAT(list('first' = resultsDF, 'second' = resultsDF[1:2000,]))
head(cat)

OscarBrock/gCrisprTools documentation built on Oct. 25, 2022, 7:29 a.m.