reading in data in ReadqPCR
2
0
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 10.3 years ago
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.
qPCR Annotation HTqPCR qPCR Annotation HTqPCR • 2.1k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 days ago
United States
Hi Franklin, First, sending the same exact email under two different threads is not considered good form. On 2/24/2013 4:34 PM, Franklin Johnson [guest] wrote: > 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 Is this really what you expect to see? Do you not find it odd that you have a single column, with everything separated by a \t? Additionally, are you aware that 'csv' stands for comma-separated values? I would recommend getting this first step sorted out prior to going on. Best, Jim > > ## 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. > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician University of Washington Environmental and Occupational Health Sciences 4225 Roosevelt Way NE, # 100 Seattle WA 98105-6099
ADD COMMENT
0
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 10.3 years ago
Dear James, Thanks for your reply. Very useful information, indeed. Much appreciation. Now I can import into NormqPCR and HTqPCR. I'm having some issues, but, I'm gonna try and work them out. I'm sure you'll hear from me again. Regards, Franklin -- output of sessionInfo(): N/A -- Sent via the guest posting facility at bioconductor.org.
ADD COMMENT

Login before adding your answer.

Traffic: 408 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