ct.prepareAnnotation: Check and optionally subset an annotation file for use in a...

Description Usage Arguments Value Author(s) Examples

View source: R/ExtractKeyFromAnnotation.R

Description

This function processes a supplied annotation object for use in a pooled screening experiment. Originally this was processed into something special, but now it essentially returns the original annotation object in which the geneSymbol column has been factorized. This is primarily used internally during a call to the ct.generateResults() function. Also performs some minor functionality checking.

Usage

1
2
ct.prepareAnnotation(ann, object = NULL, controls = TRUE,
  throw.error = TRUE)

Arguments

ann

A data.frame containing an annotation object with gRNA-level information encoded as rows. The row.names attribute should correspond to the individual gRNAs, and it should at minimum contain columns named "geneID" and "geneSymbol" indicating the corresponding gRNA target gene ID and symbol, respectively.

object

If supplied, an object with row.names to be used to subset the supplied annotation frame for downstream analysis.

controls

The name of a value in the geneSymbol column of ann that corresponds to nontargeting control gRNAs. May also be supplied as a logical value, in which case the function will try to identify and format nontargeting guides.

throw.error

Logical indicating whether to throw an error when controls is TRUE but no nontargeting gRNAs are detected.

Value

A new annotation data frame, usually with nontargeting controls and NA values reformatted to NoTarget (and geneID set to 'no_gid'), and the "geneSymbol" column of ann factorized. If supplied with an object, the gRNAs not present in the object will be omitted.

Author(s)

Russell Bainer

Examples

1
2
3
4
data('ann')
data('es')
es <- ct.filterReads(es)
newann <- ct.prepareAnnotation(ann, es)

gCrisprTools documentation built on Nov. 1, 2018, 3:02 a.m.