ct.viewControls {gCrisprTools} | R Documentation

## View nontargeting guides within an experiment

### Description

This function tries to identify, and then plot the abundance of, the full set of non-targeting controls from an ExpressionSet object. Ideally, the user will supply a geneSymbol present in the appropriate annotation file that uniquely identifies the nontargeting gRNAs. Absent this, the the function will search for common identifier used by nontargeting controls (geneID "no_gid", or geneSymbol NA).

### Usage

    ct.viewControls(eset, annotation, sampleKey, geneSymb = NULL,
      normalize = TRUE, lib.size = NULL)

### Arguments

`eset` | An ExpressionSet object containing, at minimum, a matrix of gRNA abundances extractable with the `exprs` function.
`annotation` | An annotation data.frame for the experiment. gRNAs are annotated by row, and must minimally contain columns `geneSymbol` and `geneID`.
`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 condition is assumed to be the first `level`.
`geneSymb` | The `geneSymbol` identifier in `annotation` that corresponds to nontargeting gRNAs. If absent, `ct.ViewControls` will attempt to infer nontargeting guides by searching for `"no_gid"` or `NA` in the appropriate columns.
`normalize` | Logical indicating whether to attempt to normalize the data in the `eset` by DESeq size factors present in the metadata. If `TRUE`, then the metadata must contain a column containing these factors, named `sizeFactor.crispr-gRNA`.
`lib.size` | An optional vector of voom-appropriate library size adjustment factors, usually calculated with `calcNormFactors` and transformed to reflect the appropriate library size. These adjustment factors are interpreted as the total library sizes for each sample, and if absent will be extrapolated from the columnwise count sums of the `exprs` slot of the `eset`.

### Value

An image of nontargeting control gRNA abundances on the default device.

### Author(s)

Russell Bainer

### Examples

    data('es')
    data('ann')

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

    ct.viewControls(es, ann, sk, geneSymb = NULL, normalize = FALSE)
    ct.viewControls(es, ann, sk, geneSymb = NULL, normalize = TRUE)

[Package gCrisprTools version 1.12.0 Index]