[BioC] reading in data in ReadqPCR

Franklin Johnson [guest] guest at bioconductor.org
Sun Feb 24 22:34:18 CET 2013


Hello,

I have qPCR data that does not have Well and Plate info to populate qPCRBatch object. As your vignette points, out, I am trying to create an eSet object: 

> frame<-read.delim("dreamy.csv", skip=2, sep="\t", colClasses="character") 
> n=30
> head(frame)
  Actin_022.Triton.X.control.hskg.20.59.1
1 Actin_022\tTriton-X\tcontrol\thskg\t20.00\t2
2 Actin_022\tTriton-X\tcontrol\thskg\t22.96\t3
3 Actin_122\tTriton-X\tcontrol\thskg\t20.95\t1
4 Actin_122\tTriton-X\tcontrol\thskg\t20.86\t2
5 Actin_122\tTriton-X\tcontrol\thskg\t20.96\t3
6 Actin_322\tTriton-X\tcontrol\thskg\t20.97\t1

## new("eSet", class=matrix) of Ct values
> mat=matrix(as.numeric(frame$Ct), ncol=1, nrow=30, byrow=FALSE)
> summary(mat)
       V1            V2            V3            V4            V5     
 Min.   : NA   Min.   : NA   Min.   : NA   Min.   : NA   Min.   : NA  
 1st Qu.: NA   1st Qu.: NA   1st Qu.: NA   1st Qu.: NA   1st Qu.: NA  
 Median : NA   Median : NA   Median : NA   Median : NA   Median : NA  
 Mean   :NaN   Mean   :NaN   Mean   :NaN   Mean   :NaN   Mean   :NaN  
 3rd Qu.: NA   3rd Qu.: NA   3rd Qu.: NA   3rd Qu.: NA   3rd Qu.: NA  
 Max.   : NA   Max.   : NA   Max.   : NA   Max.   : NA   Max.   : NA  
 NA's   :30    NA's   :30    NA's   :30    NA's   :30    NA's   :30   

## use eSet formatting 
new("ExpressionSet", phenoData = new("AnnotatedDataFrame"), featureData = new("AnnotatedDataFrame"), 
experimentData = new("MIAME"), annotation = character(0), exprs = new("matrix"))
...
> rawdog<-new("qPCRset", exprs=mat, phenoData=as(data.frame(frame$featureType, rep(c("control", "target"), each=15), 
frame$featureClass, rep(c("hkgs, "jasmonic pathway", each=15), 
featureData=as(data.frame(frame$featureNames, rep(c("Gene", 1:n, sep="\t")))))
##But get undetermined error. 
Error: unexpected symbol in "rawdog<-new("qPCRset", exprs=mat, phenoData=as(data.frame(frame$featureType, rep(c("control", "target"), each=15), 
as(data.frame(frame$featureClass, rep(c("hkgs, "jasmonic"

##Also tried to use methods: "AnnotatedDataFrameFrom", (coerse using: phenoData=(phenodata)), (AnnotatedDataFrame"), 
rbind() <-get error message that matrix must be of AssayData type  

##tried adding paretheses to ("frame$columnName") 
> rawdog<-new("qPCRset", exprs=mat,phenoData=as(data.frame(frame$featureType), rep(c("control", "target"), each=15), (frame$featureClass, rep(c("hkgs, "jasmonic pathway", each=15), featureData=as(data.frame(frame$featureNames, rep(c("Gene", 1:n, sep="\t"))))
Error: unexpected ',' in "rawdog<-new("qPCRset", exprs=mat,phenoData=as(data.frame(frame$featureType), rep(c("control", "target"), each=15), (frame$featureClass,"
##Mixed from HTqPCR vinette and R scripts
> raw=new("qPCRset", exprs=mat, phenoData=AnnotatedDataFrame(array(frame$featureNames, frame$SampleName),featureData=AnnotatedDataFrame(frame$featureType, 
frame$featureCategory)))
Error in function (classes, fdef, mtable)  : 
  unable to find an inherited method for function "AnnotatedDataFrame", for signature "NULL", "missing"

>Dreamy.csv

Sample  Detector                                
featureNames    sampleNames     featureType     featureClass    Ct      replicateType
Actin_022       Triton-X        control hskg    20.59   1
Actin_022       Triton-X        control hskg    20.00   2
Actin_022       Triton-X        control hskg    22.96   3
Actin_122       Triton-X        control hskg    20.95   1
Actin_122       Triton-X        control hskg    20.86   2
Actin_122       Triton-X        control hskg    20.96   3
Actin_322       Triton-X        control hskg    20.97   1
Actin_322       Triton-X        control hskg    21.18   2
Actin_322       Triton-X        control hskg    21.81   3
Actin_722       Triton-X        control hskg    21.14   1
Actin_722       Triton-X        control hskg    20.85   2
Actin_722       Triton-X        control hskg    21.78   3
Actin_1422      Triton-X        control hskg    21.54   1
Actin_1422      Triton-X        control hskg    21.11   2
Actin_1422      Triton-X        control hskg    22.45   3
Lox22_022       Triton-X        target  jasmonic pathway        23.93   1
Lox22_022       Triton-X        target  jasmonic pathway        23.36   2
Lox22_022       Triton-X        target  jasmonic pathway        23.52   3
Lox22_122       Triton-X        target  jasmonic pathway        24.82   1
Lox22_122       Triton-X        target  jasmonic pathway        24.71   2
Lox22_122       Triton-X        target  jasmonic pathway        25.61   3

Once I figure out the eSet formatting, I Would also like to add a column to phenoData: [[replicateType]] to tell R that I have replicates. I have simulated the data above, however, I have N=3 samples (untreated control, negative control, and treated) each having 2 technical replicates Actin_022 is paired with Lox22_022, each having 3 biological replicates, respectively.   

If possible, could you offer help on rawdog<-new(eSet, "AnnotatedDataFrameS")

Best Regards,

Franklin


 -- output of sessionInfo(): 

> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] NormqPCR_1.4.0      ReadqPCR_1.4.0      affy_1.36.1         BiocInstaller_1.8.3 HTqPCR_1.12.0       limma_3.14.0       
[7] RColorBrewer_1.0-5  Biobase_2.18.0      BiocGenerics_0.4.0 

loaded via a namespace (and not attached):
[1] affyio_1.26.0         gdata_2.12.0          gplots_2.11.0         gtools_2.7.0          preprocessCore_1.20.0 stats4_2.15.1        
[7] tools_2.15.1          zlibbioc_1.4.0       


--
Sent via the guest posting facility at bioconductor.org.



More information about the Bioconductor mailing list