[BioC] HTqPCR: qPCRset

Franklin Johnson [guest] guest at bioconductor.org
Sat Feb 23 22:58:53 CET 2013


Dear Maintainer,

Last week, I submitted a post to bioconductor.
However, I have been working on my HTqPCR scripts to form a qPCRset-ExpressionSet.

I am almost there, but I'm getting hung up with some structural errors, perhaps, when creating new(eSet):

> 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", phenoData=(phenodata, "AnnotatedDataFrame"), 
rbind() <-get error message that data.frame 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 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
[1] HTqPCR_1.12.0      limma_3.12.1       RColorBrewer_1.0-5 Biobase_2.18.0     BiocGenerics_0.4.0

loaded via a namespace (and not attached):
 [1] affy_1.36.1           affyio_1.26.0         BiocInstaller_1.8.3   gdata_2.11.0          gplots_2.11.0         gtools_2.7.0          preprocessCore_1.20.0
 [8] stats4_2.15.1         tools_2.15.1          zlibbioc_1.3.0       
> 


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



More information about the Bioconductor mailing list