NewmanOmics: Tools for Personalized Transcriptomics"

knitr::opts_chunk$set(echo = TRUE, fig.width=7,fig.height=5,echo=TRUE)

In this vignette, we describe how to use the NewmanOmics Paired and Banked tests to analyze gene expression data from a single sample.

Getting Started

As usual, we start by loading the package:


The package contains paired tumor and normal samples from patients with head and neck cancer. these came from a study that was submitted to the Gene Expression Omnibus.

GSE6631[1:5, 1:4]

As we can see, this consists of (normalized) Affymetrix microarray data. The odd numbered columns are derived from normal mucosa, and the even numbered columns are derived from paired tumor samples.

Before proceeding, we are going to log-transform the data.

HN <- log2(1 + GSE6631)
boxplot(HN, col=c("forestgreen", "dodgerblue"))

The figure suggests that the the data have been reasonably normalized, and that it is unlikely to be overwhelmed by artifacts.

Paired Statistic

To illustrate the Newman Paired test, we are going to use only one sample.

HN1 <- HN[, 1:2]
result1 <- pairedStat(HN1, pairing = c(-1,1))

We can create a histogram of the per-gene (empirical) p-values


We can also produce an "M-versus-A" plot of the data.


Alternate Inputs

The pairedStat function has flexible inputs, allowing you to store the data in various ways. Here we run the algorithm for three pairs, with an explicit pairing vector.

result2 <- pairedStat(HN[, 1:6], pairing=c(-1, 1, -2, 2, -3, 3))

We can also input the same data as a pair of matrices.

normals <- HN[, c(1,3,5)]
tumors <- HN[, c(2,4,6)]
result3 <- pairedStat(normals, tumors)

Or we can input the same data as a list of paired samples.

listOfPairs <- list(HN[,1:2], HN[,3:4], HN[,5:6])
result4 <- pairedStat(listOfPairs)

Banked Statistic

A completely different approach to personalized transcriptomics is to compare individual samples to a "bank" of known normals.

normals <- HN[, seq(1, ncol(HN), 2)] # odds are normal
tumors <- HN[, seq(2, ncol(HN), 2)] # evens are tumor
bank <- createBank(normals)
result5 <- bankStat(bank, tumors[,1,drop=FALSE])
hist(result5$p.values, breaks=101)

Try the NewmanOmics package in your browser

Any scripts or data that you put into this service are public.

NewmanOmics documentation built on Aug. 6, 2019, 1:02 a.m.