pairwise_compare: Generate statistics associated with pairwise differential...

Description Usage Arguments Value Note

View source: R/utility-functions.R

Description

When provided with an ExpressionSet, comparisons are made between control and perturbation samples.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 
pairwise_compare(
  eset,
  control_perturb_col = "cmap",
  control="control",
  perturb="perturbation")
pairwise_compare_limma(
 eset,
  control_perturb_col = "cmap",
  control="control",
  perturb="perturbation",
  limma.index=2)

Arguments

eset

ExpressionSet with all array data for a single instance, plus metadata on which arrays are perturbation and control.

control_perturb_col

Column name in phenoData of eset where control/perturbation designations are stored.

control

String designating control samples in the control_perturb_col column.

perturb

String designating perturbation samples in the control_perturb_col column.

limma.index

Integer specifying the index of the parameter estimate for which we to extract t and other statistics. The default corresponds to a two-class comparison with the standard parameterization. The function assumes that there was no missing data, so that test for all genes were performed on the same sample size.

Value

The function returns a data frame with the following columns:

log_fc

Log fold-change between perturbed and control data. (A positive value denotes higher expression in the perturbed samples.)

z

When at least one condition has two or more samples, the pairwise_compare_limma functions uses lmFit, eBayes and topTable to compare the two classes and compute an (uncorrected) limma p-value. The pairwise_compare functions performs a standard t-test instead. For ease of comparison across instances with different numbers of samples, either p-value is converted to the standard normal scale. The result is reported here. As for fc, positive values denote higher expression in perturbed samples.

p

When at least one condition has two or more samples, the two-tailed standard (pairwise_compare) or limma p-value (pairwise_compare_limma), as computed by eBayes. Note that this p-value can also be computed from z, via pnorm (doubling for two tails).

Note

The pairwise_compare functions returns p-values from a standard t-test. The pairwise_compare_limma functions uses the limma package instead to perform a moderated t-test.


gCMAP documentation built on April 29, 2020, 3:54 a.m.