ct.makeReport: Generate a full experimental report from a pooled CRISPR...

View source: R/generateReports.R

ct.makeReportR Documentation

Generate a full experimental report from a pooled CRISPR screen

Description

This is a function to generate an html report for a CRISPR screen, incorporating information about a specified contrast. The report contains a combination of experiment-level and contrast-specific analyses, largely 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.makeReport(
  fit,
  eset,
  sampleKey,
  annotation,
  results,
  aln,
  outdir = NULL,
  contrast.term = NULL,
  identifier = NULL
)

Arguments

fit

An object of class MArrayLM containing, at minimum, a coefficents slot with coefficients from the comparison, and a stdev.unscaled slot with the corresponding standard deviation of the coefficent estimates. The row.names attribute should ideally match that which is found in annotation, but this will be checked internally.

eset

An ExpressionSet object containing, at minimum, a matrix of gRNA abundances extractable with the exprs() function and some named phenodata extractable with pData().

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.

annotation

An annotation object for the experiment. See the man page for ct.prepareAnnotation() for details and example format.

results

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

aln

A numeric alignment matrix, where rows correspond to 'targets', 'nomatch', 'rejections', and 'double_match', and where columns correspond to experimentasl samples. Users may also pass 'NULL' to suppress evaluation of alignment.

outdir

A directory in which to generate the report; if NULL, a temporary directory will be automatically generated. The report will be located in a subdirectory whose name is internally generated (see below). The path to the report itself is returned by the function.

contrast.term

A parameter passed to ct.preprocessFit in the event that the fit object contains data from multiple contrasts. See that man page for further details.

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 including the timestamp will be generated.

Value

The path to the generated html report.

Author(s)

Russell Bainer

Examples

data('fit')
data('es')

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

data('ann')
data('resultsDF')
data('aln')
path2report <- ct.makeReport(fit, es, sk, ann, resultsDF, aln, outdir = '.') 

RussBainer/gCrisprTools documentation built on Nov. 5, 2022, 2:35 p.m.