HTqPCR cannot read more recent SDS files
1
0
Entering edit mode
@henrikseidel-11484
Last seen 7.9 years ago

In HTqPCR, the header in SDS files is identified as the first line beginning with a hash mark (#). Newer SDS file formats use the word "Well" at the beginning of the header line instead. For that reason, HTqPCR fails to read recent SDS files. This can be solved easily by adding "Well" as one alternative when searching for the header in the SDS file. Also, newer SDS files have different column orders and multiple flag columns. Therefore, the default column indeces for SDS files should probably better be adjusted to the current SDS format and no flag column should be specified by default.

diff --git a/R/readCtData.R b/R/readCtData.R
index ce9a964..28f11f4 100644
--- a/R/readCtData.R
+++ b/R/readCtData.R
@@ -41,7 +41,7 @@ function(files,
     if (missing(column.info)) {
         column.info <- switch(format,
             plain    = list(flag=4, feature=6, type=7, position=3, Ct=8),
-            SDS    = list(flag=4, feature=6, type=7, position=3, Ct=8),
+            SDS    = list(feature=3, type=5, position=1, Ct=6),
             LightCycler    = list(feature="Name", position="Pos", Ct="Cp"),
             CFX    = list(feature="Content", position="Well", Ct="Cq.Mean"),
             OpenArray    = list(flag="ThroughHole.Outlier", feature="Assay.Assay.ID", type="Assay.Assay.Type", position="ThroughHole.Address", Ct="ThroughHole.Ct"),
@@ -172,7 +172,7 @@ function(readfile=readfile, n.data=n.data, i=i, nspots=nspots, ...)
{
     # Scan through beginning of file, max 100 lines
     file.header <- readLines(con=readfile, n=100)
-    n.header <- grep("^#", file.header)
+    n.header <- grep("^(#|Well)", file.header)
     if (length(n.header)==0)
         n.header <- 0
     # Read data, skip the required lines
htqpcr • 1.2k views
ADD COMMENT
0
Entering edit mode
hdvinge • 0
@hdvinge-12367
Last seen 7.8 years ago

Hi Henrik, thanks for pointing this out, I wasn't aware that the SDS format had changed. I'll add this to the next release of the package.

ADD COMMENT

Login before adding your answer.

Traffic: 852 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6