ct.makeContrastReport {gCrisprTools} | R Documentation

## Generate a Contrast report from a pooled CRISPR screen

### Description

This is a function to generate an html Contrast report for a CRISPR screen, focusing on contrast-level analyses collected from other functions in `gCrisprTools`. It is designed to be used 'as-is', and analysts interested in using different functionalities of the various functions should do that outside of this wrapper script.

### Usage

    ct.makeContrastReport(
      eset,
      fit,
      sampleKey,
      results,
      annotation,
      comparison.id,
      identifier,
      contrast.subset = colnames(eset),
      outdir = NULL
    )

### Arguments

`eset` | An ExpressionSet object containing, at minimum, a matrix of gRNA abundances extractable with the `exprs()` function and some named phenodata extractable with `pData()`.
`fit` | A fit object for the contrast of interest, usually generated with `lmFit`.
`sampleKey` | A sample key, supplied as an ordered factor linking the samples to experimental variables. The `names` attribute should exactly match those present in `eset`, and the control set is assumed to be the first `level`.
`results` | A data.frame summarizing the results of the screen, returned by the function `ct.generateResults`.
`annotation` | An annotation object for the experiment. See the man page for `ct.prepareAnnotation()` for details and example format.
`comparison.id` | character with a name of the comparison.
`identifier` | A character string to name the report and corresponding subdirectories. If provided, the final report will be called '`identifier`.html' and will be located in a directory called `identifier` in the `outdir`. If `NULL`, a generic name
`contrast.subset` | character vector containing the sample labels to be used in the analysis; all elements must be contained in the `colnames` of the specified `eset`. including the timestamp will be generated. Default: `colnames(eset)`.
`outdir` | An optional character string indicating the directory in which to generate the report. If `NULL`, a temporary directory will be automatically generated.

### Value

The path to the generated html report.

### Author(s)

Russell Bainer, Dariusz Ratman

### Examples

    data('es')
    data('fit')
    data('ann')
    data('resultsDF')

    ##' #Build the sample key
    library(Biobase)
    sk <- ordered(relevel(as.factor(pData(es)$TREATMENT_NAME), "ControlReference"))
    names(sk) <- row.names(pData(es))

    path2report <- ct.makeContrastReport(es, fit, sk, resultsDF, ann, comparison.id = NULL, outdir = ".")

[Package gCrisprTools version 1.20.0 Index]