ap_count: Bead count

View source: R/ch_functions.R

ap_countR Documentation

Bead count

Description

Filter and/or flag samples and beads with low bead count.

Usage

ap_count(
  x,
  internal_sampID = "sample_name",
  external_sampID = "tube_label",
  Aglabels = "Gene_agID",
  protein = "GeneShort",
  agID = "PrEST",
  samp_co = 32,
  bead_flag = 32,
  bead_filter = 16,
  N_filter = 0,
  bead_dispense = 32,
  luminex_wash = 96,
  presampfilter = FALSE,
  plotafter = TRUE,
  shouldplot = TRUE,
  shouldpdf = TRUE,
  filename = "bead_count.pdf",
  width = 12,
  height = 10,
  useDingbats = FALSE,
  cex_axis_samp = 0.1,
  cex_axis_ag = 0.1,
  ...
)

Arguments

x

List with at least four elements, see Details for naming and content.

internal_sampID

Column name in SAMPLES with internal sample IDs, such as from LIMS. Replicates (named with one of pool|rep|mix|commercial, not case sensitive) and blanks (named with one of empty|blank|buffer, not case sensitive) must be stated in this column.

external_sampID

Column name in SAMPLES with external sample IDs, such as given from the collaborator or user.

Aglabels

Column name in BEADS with antigen names to be used in pdf.

protein

Column name in BEADS with short protein or gene name.

agID

Column name in BEADS with antigen identifier, eg. PrEST ID or product number.

samp_co

Cutoff for filtering samples with low median count.

bead_flag

Cutoff for flagging beads with low counts.

bead_filter

Cutoff for filtering beads with low counts.

N_filter

Accepted number of samples with low count per bead ID.

bead_dispense

How many wells are beads dispensed in per aspiration? If all in one dispense, then input is NA, 0 , or 1. If evenly divided, then input is one value with number of wells per dispense, e.g. 96. If unevenly distributed, then input is a vector of how many wells per dispense, e.g. c(rep(96, 3), rep(48, 2)) for first three dispenses being 96 at a time, and the last 96 being divided in two dispenses.

luminex_wash

After how many wells are there washes in the Luminex?

presampfilter

Logical, should samples with annotation under Filtered be removed prior to count evaluation?

plotafter

Logical, should plots after filtering be included?

shouldplot

Logical, should a plot be made?

shouldpdf

Logical, should it plot to pdf?

filename

String with filename and desired path, end with .pdf

width, height

Width and height for pdf, see pdf().

useDingbats

Logical. Default is FALSE, compared to in default pdf().

cex_axis_samp

Text size on x-axis in sample-based plots.

cex_axis_ag

Text size on x-axis in bead-based plots.

...

Other arguments passed to ap_textplot.

Details

The x list needs to include at least the elements:

COUNT = bead count,

BEADS = Beads info. See below for required columns.

SAMPLES = Sample info. See below for required columns.

FILTERINFO = Vector with info on which filter steps has been done.

The BEADS element needs at least the columns:

"BeadID" with bead ID number,

separate columns with full desired labels, protein/gene names and product ID numbers.

The SAMPLES element needs at least the columns:

"AssayWell" with Well IDs in the assay plate, e.g A01, B01 etc.,

"Filtered" if presampfilter=TRUE

Note: The function plots to a layout containing up to four areas.

Value

Updated input x with relevant filtering and/or flagging info and a pdf with plots (if shouldplot=TRUE and shouldpdf=TRUE).


cekehe/rappp documentation built on May 17, 2022, 8:54 a.m.