ct.generateResults: Calculate results of a crispr screen from a contrast

Description Usage Arguments Value Author(s) Examples

View source: R/GenePvalsFromEset.R


This is a wrapper function that enables direct generation of target-level p-values from a crispr screen.


ct.generateResults(fit, annotation, RRAalphaCutoff = 0.1,
  permutations = 1000, contrast.term = NULL, scoring = c("combined",
  "pvalue", "fc"), permutation.seed = NULL)



An object of class MArrayLM containing, at minimum, a t slot with t-statistics from the comparison, a df.residual slot with the corresponding residuals fo the model fits, and an Amean slot with the respective mean abundances.


An annotation file for the experiment. gRNAs are annotated by row, and must minimally contain columns geneSymbol and geneID.


A cutoff to use when defining gRNAs with significantly altered abundance during the RRAa aggregation step, which may be specified as a single numeric value on the unit interval or as a logical vector. When supplied as a logical vector (of length equal to nrows(fit)), this parameter directly indicates the gRNAs to include during RRAa aggregation. Otherwise, if scoring is set to pvalue or combined, this parameter is interpreted as the maximum nominal p-value required to consider a gRNA's abundance meaningfully altered during the aggregation step. If scoring is fc, this parameter is interpreted as the proportion of the list to be considered meaningfully altered in the experiment (e.g., if RRAalphaCutoff is set to 0.05, only consider the rankings of the 5 (or downregulated) gRNAs for the purposes of RRAa calculations).

Note that this function uses directional tests to identify enriched or depleted targets, and when RRAalphaCutoff is provided as a logical vector, only one of these hypotheses is implicitly specified; this means that enrichment and depletion cannot be .


The number of permutations to use during the RRAa aggregation step.


If a fit object with multiple coefficients is passed in, a string indiating the coefficient of interest.


The gRNA ranking method to use in RRAa aggregation. May take one of three values: pvalue, fc, or 'combined'. pvalue indicates that the gRNA ranking statistic should be created from the (one-sided) p-values in the fit object. fc indicates that the ranks of the gRNA coefficients should be used instead, and combined indicates that that the coefficents should be used as the ranking statistic but gRNAs are discarded in the aggregation step based on the corresponding nominal p-value in the fit object.


numeric seed for permutation reproducibility. Default: NULL means to not set any seed. This argument is passed through to ct.RRAaPvals.


A dataframe containing gRNA-level and target-level statistics. In addition to the information present in the supplied annotation object, the returned object indicates P-values and Q-values for the depletion and enrichment of each gRNA and associated target, the median log2 fold change estimate among all gRNAs associated with the target, and Rho statistics that are calculated internally by the RRAa algorithm that may be useful in ranking targets that are considered significant at a given alpha or false discovery threshold.

A 'resultsDF' formatted dataframe containing gene-level statistics.


Russell Bainer


output <- ct.generateResults(fit, ann, permutations = 10)

gCrisprTools documentation built on May 31, 2017, 11:42 a.m.

Search within the gCrisprTools package
Search all R packages, documentation and source code