ct.PRC: Generate a Precision-Recall Curve from a CRISPR screen

Description Usage Arguments Value Author(s) Examples

View source: R/GeneratePRC.R

Description

Given a set of targets of interest, this function generates a Precision Recall curve from the results of a CRISPR screen. Specifically, it orders the target elements in the screen by the specified statistic, and then plots the recall rate (proportion of true targets identified) against the precision (proportion of identified targets that are true targets).

Note that ranking statistics in CRISPR screens are (usually) permutation-based, and so some granularity in the rankings is expected. This function does a little extra work to ensure that hits are counted as soon as the requisite value of the ranking statistic is reached regardless of where the gene is located within the block of equally-significant genes. Functionally, this means that the drawn curve is somewhat anticonservative in cases where the gene ranks are not well differentiated.

Usage

1
2
3
4
5
6
7
ct.PRC(
  summaryDF,
  target.list,
  stat = c("enrich.p", "deplete.p", "enrich.fc", "deplete.fc", "enrich.rho",
    "deplete.rho"),
  plot.it = TRUE
)

Arguments

summaryDF

A dataframe summarizing the results of the screen, returned by the function ct.generateResults.

target.list

A character vector containing the names of the targets to be tested. Only targets contained in the geneID column of the provided summaryDF are considered.

stat

The statistic to use when ordering the genes. Must be one of "enrich.p", "deplete.p", "enrich.fc", or "deplete.fc".

plot.it

Logical value indicating whether to plot the curves.

Value

A list containing the the x and y coordinates of the curve.

Author(s)

Russell Bainer

Examples

1
2
3
4
data('resultsDF')
data('essential.genes') #Note that this is an artificial example.
pr <- ct.PRC(resultsDF, essential.genes, 'enrich.p')
str(pr)

gCrisprTools documentation built on Nov. 8, 2020, 8:17 p.m.