[Qpcr-commits] r141 - in pkg/NormqPCR: . R inst/doc man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jul 1 00:05:38 CEST 2011
Author: jperkins
Date: 2011-07-01 00:05:38 +0200 (Fri, 01 Jul 2011)
New Revision: 141
Removed:
pkg/NormqPCR/R/plotDCt.R
pkg/NormqPCR/R/plotDdCt.R
pkg/NormqPCR/man/plotDCt.Rd
pkg/NormqPCR/man/plotDdCt.Rd
Modified:
pkg/NormqPCR/DESCRIPTION
pkg/NormqPCR/NAMESPACE
pkg/NormqPCR/R/allGenerics.R
pkg/NormqPCR/R/combineTechReps.R
pkg/NormqPCR/R/stabMeasureRho.R
pkg/NormqPCR/inst/doc/NormqPCR.Rnw
pkg/NormqPCR/man/NormqPCR-package.Rd
pkg/NormqPCR/man/deltaCt.Rd
pkg/NormqPCR/man/deltaDeltaCt.Rd
pkg/NormqPCR/man/replaceAboveCutOff.Rd
pkg/NormqPCR/man/selectHKs.Rd
pkg/NormqPCR/man/stabMeasureM.Rd
pkg/NormqPCR/man/stabMeasureRho.Rd
Log:
stabMeasureRho now sorted, and a few other things. Adding stabMeasureRho to AllGenerics and using setGeneric on 'x' looks a bit wrong, but I can't think of a better way of doing it (since we don't know if x will be a qPCR batch or a matrix
Modified: pkg/NormqPCR/DESCRIPTION
===================================================================
--- pkg/NormqPCR/DESCRIPTION 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/DESCRIPTION 2011-06-30 22:05:38 UTC (rev 141)
@@ -5,7 +5,7 @@
Description: Functions for normalisation of real-time quantitative PCR data
Author: Matthias Kohl, James Perkins
Maintainer: James Perkins <jperkins at biochem.ucl.ac.uk>
-Depends: R(>= 2.10.0), stats, RColorBrewer, Biobase, methods, ReadqPCR, gplots
+Depends: R(>= 2.10.0), stats, RColorBrewer, Biobase, methods, ReadqPCR
Imports: Biobase
biocView: DataImport, MicrotitrePlateAssay
License: LGPL-3
Modified: pkg/NormqPCR/NAMESPACE
===================================================================
--- pkg/NormqPCR/NAMESPACE 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/NAMESPACE 2011-06-30 22:05:38 UTC (rev 141)
@@ -10,6 +10,4 @@
combineTechReps,
replaceAboveCutOff,
makeAllNAs,
- replaceNAs,
- plotDCt,
- plotDdCt)
+ replaceNAs)
Modified: pkg/NormqPCR/R/allGenerics.R
===================================================================
--- pkg/NormqPCR/R/allGenerics.R 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/R/allGenerics.R 2011-06-30 22:05:38 UTC (rev 141)
@@ -32,3 +32,8 @@
function(qPCRBatch, ...)
standardGeneric("selectHKs")
)
+
+setGeneric("stabMeasureRho",
+ function(x, ...)
+ standardGeneric("stabMeasureRho")
+)
Modified: pkg/NormqPCR/R/combineTechReps.R
===================================================================
--- pkg/NormqPCR/R/combineTechReps.R 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/R/combineTechReps.R 2011-06-30 22:05:38 UTC (rev 141)
@@ -20,7 +20,6 @@
else if (calc == "median") {
for (detector in newDetectors) {
dValues <- apply(expM[gsub("_TechReps.\\d", "", origDetectors) %in% detector, ], 2, median, na.rm = TRUE)
-# dValues <- colMedians(expM[gsub("_TechReps.\\d", "", origDetectors) %in% detector, ], na.rm = TRUE)
NewExpM[detector, ] <- dValues
}
}
Deleted: pkg/NormqPCR/R/plotDCt.R
===================================================================
--- pkg/NormqPCR/R/plotDCt.R 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/R/plotDCt.R 2011-06-30 22:05:38 UTC (rev 141)
@@ -1,21 +0,0 @@
-plotDCt <- function(..., ddCtTable, detectors="", statCalc="arith") {
- if(detectors[1]!="") {
- ddCtTable <- ddCtTable[ddCtTable$ID %in% detectors, ,drop=FALSE]
- } else {
- ddCtTable <- ddCtTable
- }
- plotNames <- ddCtTable$ID
- plotCts <- ddCtTable[,c(2,4)]
- plotSds <- ddCtTable[,c(3,5)]
- plotCts <- sapply(plotCts, function(x) as.numeric(as.character(x)))
- plotSds <- sapply(plotSds, function(x) as.numeric(as.character(x)))
-
- if(statCalc == "arith") {
- plotU <- 2^(log2(plotCts) + plotSds)
- plotL <- 2^(log2(plotCts) - plotSds)
- } else {
- plotU <- plotCts + plotSds
- plotL <- plotCts - plotSds
- }
- barplot2(..., height=t(plotCts), plot.ci=TRUE, ci.u=t(plotU), ci.l=t(plotL), beside=T)
-}
Deleted: pkg/NormqPCR/R/plotDdCt.R
===================================================================
--- pkg/NormqPCR/R/plotDdCt.R 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/R/plotDdCt.R 2011-06-30 22:05:38 UTC (rev 141)
@@ -1,28 +0,0 @@
-plotDdCt <- function(..., ddCtTable, detectors="", logFC=TRUE) {
- if(detectors[1]!="") {
- ddCtTable <- ddCtTable[ddCtTable$ID %in% detectors, ,drop=FALSE]
- } else {
- ddCtTable <- ddCtTable
- }
- plotNames <- ddCtTable$ID
-ds <- gsub("\\.\\w*$","",plotNames)
- plotdDCt <- as.numeric(as.vector(ddCtTable[,6]))
- plotMin <- as.numeric(as.vector(ddCtTable[,7]))
- plotMax <- as.numeric(as.vector(ddCtTable[,8]))
-
-plotdDCt[grep("\\+",as.vector(ddCtTable[,6]))] <- max(plotMax, na.rm=T)
-plotdDCt[grep("\\-",as.vector(ddCtTable[,6]))] <- min(plotMin, na.rm=T)
-bar.colours <- rep("blue",length(plotdDCt))
-bar.colours[grep("\\+",as.vector(ddCtTable[,6]))] <- "red"
-bar.colours[grep("\\-",as.vector(ddCtTable[,6]))] <- "red"
-
-
- if(logFC == TRUE) {
- plotdDCt <- log2(plotdDCt)
- plotMin <- log2(plotMin)
- plotMax <- log2(plotMax)
- }
- barplot2(..., names=ds, height=plotdDCt, plot.ci=TRUE, ci.u=plotMax, ci.l=plotMin, las=2, col=bar.colours, ylab="Log2 Fold Change")
-}
-
-
Modified: pkg/NormqPCR/R/stabMeasureRho.R
===================================================================
--- pkg/NormqPCR/R/stabMeasureRho.R 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/R/stabMeasureRho.R 2011-06-30 22:05:38 UTC (rev 141)
@@ -2,9 +2,10 @@
## group: factor
## log: data on log-scale
## na.rm: remove NA values
-stabMeasureRho <- function(x, group, log = TRUE, na.rm = TRUE, returnAll = FALSE){
+
+setMethod("stabMeasureRho", signature(x = "matrix"), definition =
+ function(x, group, log = TRUE, na.rm = TRUE, returnAll = FALSE){
if(class(x) == "qPCRBatch") {
- if(missing(group)) group <- pData(x)[,"Group"]
x <- t(exprs(x))
}
@@ -69,5 +70,12 @@
else
return(qmaal)
}
-}
+ }
+)
+setMethod("stabMeasureRho", signature(x = "qPCRBatch"), definition =
+ function(x, group, log = TRUE, na.rm = TRUE, returnAll = FALSE){
+ x <- t(exprs(x))
+ return(stabMeasureRho(x, group, log, na.rm, returnAll))
+ }
+)
Modified: pkg/NormqPCR/inst/doc/NormqPCR.Rnw
===================================================================
--- pkg/NormqPCR/inst/doc/NormqPCR.Rnw 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/inst/doc/NormqPCR.Rnw 2011-06-30 22:05:38 UTC (rev 141)
@@ -296,17 +296,18 @@
<<NormFinder>>=
data(Colon)
str(exprs(Colon.qPCRBatch))
-pData(Colon.qPCRBatch)
-res.Colon <- stabMeasureRho(Colon.qPCRBatch,
+group <- pData(Colon.qPCRBatch)[,"Group"]
+res.Colon <- stabMeasureRho(Colon.qPCRBatch, group = group,
log = FALSE)
sort(res.Colon) # cf. Table 3 in Andersen et al (2004)
data(Bladder)
str(exprs(Bladder.qPCRBatch))
-pData(Bladder.qPCRBatch)
-
-res.Bladder <- stabMeasureRho(Bladder.qPCRBatch,
+group <- pData(Bladder.qPCRBatch)[,"Group"]
+cat("test1")
+res.Bladder <- stabMeasureRho(Bladder.qPCRBatch, group = group,
log = FALSE)
+cat("test test")
sort(res.Bladder)
@
Of course, we can also reproduce the geNorm ranking also included in Table~3
Modified: pkg/NormqPCR/man/NormqPCR-package.Rd
===================================================================
--- pkg/NormqPCR/man/NormqPCR-package.Rd 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/man/NormqPCR-package.Rd 2011-06-30 22:05:38 UTC (rev 141)
@@ -12,9 +12,9 @@
\tabular{ll}{
Package: \tab NormqPCR\cr
Type: \tab Package\cr
-Version: \tab 1.0\cr
-Date: \tab 2011-02-22\cr
-Depends: \tab R(>= 2.10.0), stats, RColorBrewer, Biobase, methods, ReadqPCR, gplots\cr
+Version: \tab 0.99.1\cr
+Date: \tab 2011-06-30\cr
+Depends: \tab R(>= 2.10.0), stats, RColorBrewer, Biobase, methods, ReadqPCR \cr
License: \tab LGPL-3\cr
LazyLoad: \tab yes \cr
LazyData: \tab yes \cr
@@ -38,6 +38,12 @@
Normalization, Applied to Bladder and Colon Cancer Data Sets.
CANCER RESEARCH 64, 5245-5250, August 1, 2004.
\url{http://cancerres.aacrjournals.org/cgi/content/full/64/15/5245}
+
+ Kenneth Livak, Thomase Schmittgen (2001).
+ Analysis of Relative Gene Expression
+ Data Using Real-Time Quantitative PCR and the 2^ddCt Method.
+ Methods 25, 402-408, 2001
+ \url{http://www.ncbi.nlm.nih.gov/pubmed/11846609}
}
%\seealso{
%~~ Optional links to other man pages, e.g. ~~
Modified: pkg/NormqPCR/man/deltaCt.Rd
===================================================================
--- pkg/NormqPCR/man/deltaCt.Rd 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/man/deltaCt.Rd 2011-06-30 22:05:38 UTC (rev 141)
@@ -26,10 +26,11 @@
}
\references{
- Schmittgen TD, Livak KJ (2008)
- Analyzing real-time PCR data by the comparative C(T) method.
- NATURE PROTOCOLS. 3(6):1101-8
- \url{http://www.nature.com/nprot/journal/v3/n6/full/nprot.2008.73.html}
+ Kenneth Livak, Thomase Schmittgen (2001).
+ Analysis of Relative Gene Expression Data Using Real-Time Quantitative
+ PCR and the 2^DDCt Method.
+ Methods 25, 402-408, 2001
+ \url{http://www.ncbi.nlm.nih.gov/pubmed/11846609}
}
\author{ James Perkins \email{jperkins at biochem.ucl.ac.uk}}
%\note{}
Modified: pkg/NormqPCR/man/deltaDeltaCt.Rd
===================================================================
--- pkg/NormqPCR/man/deltaDeltaCt.Rd 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/man/deltaDeltaCt.Rd 2011-06-30 22:05:38 UTC (rev 141)
@@ -4,14 +4,16 @@
\alias{deltaDeltaCt,qPCRBatch-method}
\title{ Perform normalization and differential expression with given housekeeping gene }
\description{
-Normalise qPCR eset using housekeeping genes as control, then perform differential expression analysis using the delta delta Ct method.
-Differs from the deltaDeltaAvgCt method in that the hkg values are subtracted and the sd is calculated on the differences (i.e. paired).
-Suitable when housekeeping genes are from same wells/sample as the other detectors
+ Normalise qPCR eset using housekeeping genes as control, then perform differential expression analysis
+ using the delta delta Ct method.
+ Differs from the deltaDeltaAvgCt method in that the hkg values are subtracted and the sd is
+ calculated on the differences (i.e. paired).
+ Suitable when housekeeping genes are from same wells/sample as the other detectors
}
\usage{
-deltaDeltaCt(qPCRBatch,\dots)
+ deltaDeltaCt(qPCRBatch,\dots)
-\S4method{deltaDeltaCt}{qPCRBatch}(qPCRBatch, maxNACase=0, maxNAControl=0, hkgs, contrastM,
+ \S4method{deltaDeltaCt}{qPCRBatch}(qPCRBatch, maxNACase=0, maxNAControl=0, hkgs, contrastM,
case, control, paired=TRUE, hkgCalc="arith", statCalc="arith")
}
\arguments{
@@ -34,10 +36,11 @@
matrix with columns containing the detector ids, 2^delta Ct values for the sample of interest and the callibrator sample, alongside their respective standard deviations, the 2^delta delta Ct values and the minimum and maximum values (ie the values that are 1 sd away )
}
\references{
- Schmittgen TD, Livak KJ (2008)
- Analyzing real-time PCR data by the comparative C(T) method.
- NATURE PROTOCOLS. 3(6):1101-8
- \url{http://www.nature.com/nprot/journal/v3/n6/full/nprot.2008.73.html}
+ Kenneth Livak, Thomase Schmittgen (2001).
+ Analysis of Relative Gene Expression Data Using Real-Time Quantitative
+ PCR and the 2^DDCt Method.
+ Methods 25, 402-408, 2001
+ \url{http://www.ncbi.nlm.nih.gov/pubmed/11846609}
}
\author{ James Perkins \email{jperkins at biochem.ucl.ac.uk}}
%\note{}
Deleted: pkg/NormqPCR/man/plotDCt.Rd
===================================================================
--- pkg/NormqPCR/man/plotDCt.Rd 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/man/plotDCt.Rd 2011-06-30 22:05:38 UTC (rev 141)
@@ -1,33 +0,0 @@
-\name{plotDCt}
-\alias{plotDCt}
-\alias{plotDCt,qPCRBatch-method}
-\title{Plot delta Ct values}
-\description{
-Takes expression set of qPCR values and plots Delta Ct after subtraction of normalisation factor (NF) or housekeeper gene
-}
-\usage{
-plotDCt(..., ddCtTable, detectors="", statCalc="arith")
-}
-\arguments{
- \item{\dots}{ Additional arguments to pass to the plot command.
-}
- \item{ddCtTable}{ output of deltaDeltaCt.
-}
- \item{detectors}{ The detectors to show, if left blank will show all detectors.
-}
- \item{statCalc}{ The type of statistic to show.
-}
-
-}
-\details{
- Takes ddCtTable output from the deltaDeltaCt() command and plots the Ct values plus variance for a given number of detectors.
-}
-\value{
- Produces a barplot using barplot2
-}
-%\references{ }
-\author{ James Perkins \email{jperkins at biochem.ucl.ac.uk}}
-%\note{}
-%\seealso{}
-%\examples{}
-\keyword{plot,barplot,barplot2,barchart}
Deleted: pkg/NormqPCR/man/plotDdCt.Rd
===================================================================
--- pkg/NormqPCR/man/plotDdCt.Rd 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/man/plotDdCt.Rd 2011-06-30 22:05:38 UTC (rev 141)
@@ -1,33 +0,0 @@
-\name{plotDdCt}
-\alias{plotDdCt}
-\alias{plotDdCt,qPCRBatch-method}
-\title{Plot delta Ct values}
-\description{
-Takes expression set of qPCR values and plots Delta delta Ct after subtraction of normalisation factor (NF) or housekeeper gene and normalisation by subtraction of control
-}
-\usage{
-plotDdCt(..., ddCtTable, detectors="", logFC=TRUE)
-}
-\arguments{
- \item{\dots}{ Additional arguments to pass to the plot command.
-}
- \item{ddCtTable}{ output of deltaDeltaCt.
-}
- \item{detectors}{ The detectors to show, if left blank will show all detectors.
-}
- \item{logFC}{ plot fold change or log fold change.
-}
-
-}
-\details{
- Takes ddCtTable output from the deltaDeltaCt() command and plots the ddCt values.
-}
-\value{
- Produces a barplot using barplot2
-}
-%\references{ }
-\author{ James Perkins \email{jperkins at biochem.ucl.ac.uk}}
-%\note{}
-%\seealso{}
-%\examples{}
-\keyword{plot,barplot,barplot2,barchart}
Modified: pkg/NormqPCR/man/replaceAboveCutOff.Rd
===================================================================
--- pkg/NormqPCR/man/replaceAboveCutOff.Rd 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/man/replaceAboveCutOff.Rd 2011-06-30 22:05:38 UTC (rev 141)
@@ -21,7 +21,7 @@
\value{
\code{qPCRBatch} object with a new exprs slot
}
-%\references{ }
+%\references{}
\author{ James Perkins \email{jperkins at biochem.ucl.ac.uk}}
%\note{}
%\seealso{}
Modified: pkg/NormqPCR/man/selectHKs.Rd
===================================================================
--- pkg/NormqPCR/man/selectHKs.Rd 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/man/selectHKs.Rd 2011-06-30 22:05:38 UTC (rev 141)
@@ -5,7 +5,7 @@
\title{ Selection of reference/housekeeping genes }
\description{
This function can be used to determine a set of reference/housekeeping (HK)
- genes for gene expression experiments.
+ genes for gene expression experiments
}
\usage{
selectHKs(qPCRBatch, \dots)
@@ -75,6 +75,7 @@
data(geNorm)
tissue <- as.factor(c(rep("BM", 9), rep("FIB", 20), rep("LEU", 13),
rep("NB", 34), rep("POOL", 9)))
+
res.BM <- selectHKs(geNorm.qPCRBatch[,tissue == "BM"], method = "geNorm",
Symbols = featureNames(geNorm.qPCRBatch), minNrHK = 2, log = FALSE)
}
Modified: pkg/NormqPCR/man/stabMeasureM.Rd
===================================================================
--- pkg/NormqPCR/man/stabMeasureM.Rd 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/man/stabMeasureM.Rd 2011-06-30 22:05:38 UTC (rev 141)
@@ -19,7 +19,10 @@
\details{
The gene expression stability value M is defined as the average pairwise
normalization factor; i.e., one needs to specify data from at least two
- genes. For more details see Vandesompele et al. (2002).
+ genes. For more details see Vandesompele et al. (2002). Note this
+ dispatches on a transposed expression matrix, not a qPCRBatch
+ object since it is only called from within the selectHKs method.
+
}
\value{
numeric vector with gene expression stability values
Modified: pkg/NormqPCR/man/stabMeasureRho.Rd
===================================================================
--- pkg/NormqPCR/man/stabMeasureRho.Rd 2011-06-30 14:42:30 UTC (rev 140)
+++ pkg/NormqPCR/man/stabMeasureRho.Rd 2011-06-30 22:05:38 UTC (rev 141)
@@ -1,5 +1,9 @@
\name{stabMeasureRho}
\alias{stabMeasureRho}
+\alias{stabMeasureRho-methods}
+\alias{stabMeasureRho,qPCRBatch-method}
+\alias{stabMeasureRho,matrix-method}
+\alias{stabMeasureRho,x-method}
\title{ Gene expression stability value rho }
\description{
Computation of the gene expression stability value rho for real-time
@@ -7,12 +11,15 @@
Andersen et al. (2004).
}
\usage{
-stabMeasureRho(x, group, log = TRUE, na.rm = TRUE, returnAll = FALSE)
+ stabMeasureRho(x,\dots)
+
+ \S4method{stabMeasureRho}{x}(x, group, log = TRUE, na.rm = TRUE, returnAll = FALSE)
}
\arguments{
- \item{x}{ matrix or data.frame containing real-time quantitative
- RT-PCR data }
-\item{group}{ grouping factor, either a factor vector or a phenoData column called "Group" }
+ \item{x}{ matrix containing real-time quantitative
+ RT-PCR data, or qPCRBatch object }
+ \item{\dots}{ Extra arguments, detailed below }
+ \item{group}{ grouping factor, either a factor vector or a phenoData column called "Group" }
\item{log}{ logical: is data on log-scale }
\item{na.rm}{ a logical value indicating whether \code{NA} values should be
stripped before the computation proceeds. }
@@ -45,14 +52,10 @@
%}
\seealso{\code{selectHKs}}
\examples{
- data(Colon.qPCRBatch)
- Colon.qPCRBatch[["Group"]] <- c(rep("Normal",10),rep("Dukes A",10),rep("Dukes B",10),rep("Dukes C",10))
- res.Colon <- stabMeasureRho(Colon.qPCRBatch,
+ data(Colon)
+ group <- pData(Colon.qPCRBatch)[,"Group"]
+ res.Colon <- stabMeasureRho(Colon.qPCRBatch, group = group,
log = FALSE)
sort(res.Colon) # cf. Table 3 in Andersen et al (2004)
- data(Bladder.qPCRBatch)
- res.Bladder <- stabMeasureRho(Bladder.qPCRBatch,
- log = FALSE)
- sort(res.Bladder) # cf. Table 3 in Andersen et al (2004)
}
\keyword{data}
More information about the Qpcr-commits
mailing list