Selects ROI/AOI segments and target probes based on quality control and then generates gene-level count data.

qcProc(
  object,
  min.segment.reads = 1000,
  percent.trimmed = 80,
  percent.stitched = 80,
  percent.aligned = 80,
  percent.saturation = 50,
  min.nuclei = 200,
  min.area = 16000,
  min.negative.count = 10,
  max.ntc.count = 60,
  min.probe.ratio = 0.1,
  outlier.test.alpha = 0.01,
  percent.fail.grubbs = 20,
  remove.local.outliers = FALSE,
  shift.counts.zero = TRUE,
  print.plots = FALSE
)

Arguments

object

object of class NanoStringGeoMxSet with raw data and metadata supplied

min.segment.reads

minimum number of reads

percent.trimmed

minimum % of reads trimmed

percent.stitched

minimum % of reads stitched

percent.aligned

minimum % of reads aligned

percent.saturation

minimum sequencing saturation

min.nuclei

minimum # of nuclei estimated

min.area

minimum segment area

min.negative.count

minimum negative control counts

max.ntc.count

maximum counts observed in NTC well

min.probe.ratio

numeric between 0 and 1 to flag probes that have (geomean probe in all segments) / (geomean probes within target) less than or equal to this ratio

outlier.test.alpha

significance cut-off for Grubb's test to flag outlier probes

percent.fail.grubbs

numeric to flag probes that fail Grubb's test in greater than or equal this percent of segments

remove.local.outliers

boolean to determine if local outliers should be excluded from exprs matrix

shift.counts.zero

boolean to shift 0 counts (if TRUE shift 0s by 1, otherwise shift all counts by 1)

print.plots

boolean to display plots or set to FALSE otherwise; ggplot objects are returned in either case

Value

A list of two objects:

  • QC-filtered NanoStringGeoMxSet object with gene-level targets as features and the QCFlags data.frame appended to protocolData ("object")

  • QC plots in a list of ggplot objects ("plot")

  • Summary tables for segment, probe, and gene filtering ("table")

Details

A probe is removed globally from the dataset if either it does not reach the min.probe.ratio threshold or the probe is an outlier according to Grubb’s test in at least percent.fail.grubbs of segments. A probe is removed locally (from a given segment) if the probe is an outlier in that segment and remove.local.outliers is set to TRUE.

The count for any gene with multiple probes per segment is calculated as the geometric mean of those probes.