ct.stackGuides: View a stacked representation of the most variable targets or...

View source: R/StackedGuides.R

ct.stackGuidesR Documentation

View a stacked representation of the most variable targets or individual guides within an experiment, as a percentage of the total aligned reads

Description

This function identifies the gRNAs or targets that change the most from sample to sample within an experiment as a percentage of the entire library. It then plots the abundance of the top nguides as a stacked barplot for all samples in the experiment. The purpose of this algorithm is to detect potential distortions in the library composition that might not be properly controlled by sample normalization, and so the most variable entites are defined by calculating the percent of aligned reads that they contribute to each sample, and then ranking each entity by the range of these percentages across all samples. Consequently, gRNAs or Targets that are highly abundant in at least one condition will be are more likely to be identified.

Usage

ct.stackGuides(
  eset,
  sampleKey = NULL,
  nguides = 20,
  plotType = "gRNA",
  annotation = NULL,
  ylimit = NULL,
  subset = NULL
)

Arguments

eset

An ExpressionSet object containing, at minimum, a matrix of gRNA abundances extractable with the exprs() function, and a metadata object containing a column named SAMPLE_LABEL containing unique identifers for each sample. The colnames should be syntactically

sampleKey

An optional 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.

nguides

The number of guides (or targets) to display.

plotType

A string indicating whether the individual guides should be displayed ('gRNA'), or if they should be aggregated into target-level estimates ('Target') according to the geneSymbol column in the annotation object.

annotation

An optional data.frame containing an annotation object to be used to aggregate the guides into targets. gRNAs are annotated by row, and must minimally contain a column geneSymbol indicating the target elements.

ylimit

An optional numeric vector of length 2 specifying the y limits for the plot, useful in comparin across studies.

subset

An optional character vector containing the sample labels to be used in the analysis; all elements must be contained in the colnames of the specified eset.

Value

A stacked barplot displaying the appropriate entities on the default device.

Author(s)

Russell Bainer

Examples

data('es')
data('ann')
ct.stackGuides(es, nguides = 20, plotType = 'Target', annotation = ann, ylimit = NULL, subset = NULL)

OscarBrock/gCrisprTools documentation built on Oct. 25, 2022, 7:29 a.m.