ct.filterReads: Remove low-abundance elements from an ExpressionSet object

View source: R/discardTraceReads.R

ct.filterReadsR Documentation

Remove low-abundance elements from an ExpressionSet object


This function removes gRNAs only present in very low abundance across all samples of a pooled Crispr screening experiment. In most cases very low-abundance guides are the result of low-level contamination from other libraries, and often distort standard normalization approaches. This function trims gRNAs in a largely heuristic way, assuming that the majority of 'real' gRNAs within the library are comparably abundant in at least some of the samples (such as unexpanded controls), and that contaminants are present at negligible levels. Specifically, the function trims the trim most abundant guides from the upper tail of each log-transformed sample distribution, and then omits gRNAs whose abundances are always less than 1/(2^log2.ratio) of this value.


  trim = 1000,
  log2.ratio = 4,
  sampleKey = NULL,
  plot.it = TRUE,
  read.floor = NULL



An unnormalized ExpressionSet object containing, at minimum, a matrix of gRNA counts accessible with exprs().


The number of gRNAs to be trimmed from the top of the distribution before estimating the abundance range. Empirically, this usually should be equal to about 2 to 5 percent of the guides in the library.


Maximum abundance of contaminant gRNAs, expressed on the log2 scale from the top of the trimmed range of each sample. That is, log2.ratio = 4 means to discard all gRNAs whose abundance is (1/2)^4 of the trimmed maximum.


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.


Logical value indicating whether to plot the adjusted gRNA densities on the default device.


Optionally, the minimum number of reads required for each gRNA.


An ExpressionSet object, with trace-abundance gRNAs omitted.


Russell Bainer



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