[Qpcr-commits] r118 - pkg/NormqPCR/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Sep 3 16:43:13 CEST 2010
Author: jperkins
Date: 2010-09-03 16:43:13 +0200 (Fri, 03 Sep 2010)
New Revision: 118
Added:
pkg/NormqPCR/R/plotDCt.R
Log:
added plot function
Added: pkg/NormqPCR/R/plotDCt.R
===================================================================
--- pkg/NormqPCR/R/plotDCt.R (rev 0)
+++ pkg/NormqPCR/R/plotDCt.R 2010-09-03 14:43:13 UTC (rev 118)
@@ -0,0 +1,29 @@
+plotDCt <- function(ddCtTable, detectors="", logFC = FALSE) {
+ if(detectors[1]!="") {
+ ddCtTable <- ddCtTable[ddCtTable$ID %in% detectors, ,drop=FALSE]
+ } else {
+ ddCtTable <- ddCtTable
+ }
+ plotNames <- ddCtTable$ID
+ plotCts <- ddCtTable[,c("case","control")]
+ plotSds <- ddCtTable[,c("case.sd","control.sd")]
+ plotCts <- sapply(plotCts, function(x) as.numeric(as.character(x)))
+ plotSds <- sapply(plotSds, function(x) as.numeric(as.character(x)))
+
+# plotCts <- plotTable[,c("case","control")]
+# plotSds <- plotTable[,c("case.sd","control.sd")]
+ plotU <- plotCts + plotSds
+# plotL <- plotCts - plotTable[,c("case.sd","control.sd")]
+# plotU <- plotCts + plotSds
+ plotL <- plotCts - plotSds
+print(plotCts)
+
+#cat(plotU,"\n")
+#cat(plotL,"\n")
+# plotCts <- sapply(ddCtTable, function(x) as.numeric(as.character(x)))
+# plotCtsd
+# plotCtMax
+# plotCtMin
+
+ barplot2(height=t(plotCts), plot.ci=TRUE, ci.u=t(plotU), ci.l=t(plotL), beside=T)
+}
More information about the Qpcr-commits
mailing list