HTqPCR (plotCtOverview) problem
1
0
Entering edit mode
Heidi Dvinge ★ 2.0k
@heidi-dvinge-2195
Last seen 10.2 years ago
> > On Apr 30, 2010, at 3:08 PM, Heidi Dvinge wrote: > >>> >>> On Apr 30, 2010, at 2:42 PM, Heidi Dvinge wrote: >>> >>>> Hello Mike, >>>> >>>>> Greetings >>>>> >>>>> I have R 2.11, BioC 2.6 and HTqPCR 1.2 (see session info at the >>>>> end). >>>>> >>>>> I created a qPCRset object by using rbind() to concatenate four >>>>> pairs >>>>> of dissimilar cards for each experimental condition and then >>>>> cbind() >>>>> to concatenate the four objects into one: >>>>> >>>>> WT_time1.a | >>>>> WT_time1.b |---> WT_time1 >>>>> MT_time1.a | >>>>> MT_time1.b |---> MT_time1 >>>>> WT_time2.a | ---> s2010004660 >>>>> WT_time2.b |---> WT_time2 >>>>> MT_time2.a | >>>>> MT_time2.b |---> MT_time2 >>>>> >>>>> I set g <- c("MammU6") which is a endogenous control gene. >>>>> >>>>> I then tried to plotCtOverview(s2010004660, genes=g, >>>>> groups=sampleNames(qPCRset), conf.int=TRUE) and got >>>>> >>>>>> plotCtOverview(s2010004660, genes=g, conf.int=TRUE) >>>>> Error in if (del == 0 && to == 0) return(to) : >>>>> missing value where TRUE/FALSE needed >>>>> >>>>> Here's the object info: >>>>> >>>>>> s2010004660 >>>>> An object of class "qPCRset" >>>>> Size: 768 features, 4 samples >>>>> Feature types: Endogenous Control, Target >>>>> Feature names: mmu-let-7b-4373168 mmu-let-7c-4373167 mmu- >>>>> let-7d-4395394 ... >>>>> Feature classes: >>>>> Feature categories: OK, Undetermined >>>>> Sample names: WT_4wks MT_4wks WT_17wks ... >>>>> >>>>> Could it be that the Feature classes slot is empty? >>>>> >>>> Feature classes shouldn't matter at all here. I can reproduce this >>>> using >>>> the data sets included in HTqPCR (qPCRraw and qPCRpros) though. What >>>> does >>>> traceback() say? And does the same happen when you use >>>> conf.int=FALSE? >>> >>> Thanks Heidi >>> >>> Here's the traceback(): >>> >>>> plotCtOverview(s2010004660, genes=g, conf.int=TRUE) >>> Error in if (del == 0 && to == 0) return(to) : >>> missing value where TRUE/FALSE needed >>>> traceback() >>> 3: seq.default(1.5, ncol(SD) * (nrow(SD) + 1), nrow(SD) + 1) >>> 2: seq(1.5, ncol(SD) * (nrow(SD) + 1), nrow(SD) + 1) >>> 1: plotCtOverview(s2010004660, genes = g, conf.int = TRUE) >>> >>> conf.int = FALSE it makes the plot without complaining. Actually, it >>> makes the plot in the first case, too, it just doesn't draw error >>> bars. >>> >> Hm, so for some reason it can't calculate a standard deviation for >> your >> qPCRset. However it should work even if SD returns NA. >> >> Do your have replicate genes in your set? And what happens if you >> say e.g. >> groups=c("A", "A", "B", "B")? > Heidi > > I see the same problem. > > > plotCtOverview(s2010004660, genes=g, > groups=c("WT_4wks"),conf.int=TRUE,replicates=TRUE) > Error in if (del == 0 && to == 0) return(to) : > missing value where TRUE/FALSE needed > > plotCtOverview(s2010004660, genes=g, > groups=c("WT_4wks","MT_4wks"),conf.int=TRUE,replicates=TRUE) > Error in if (del == 0 && to == 0) return(to) : > missing value where TRUE/FALSE needed > Just for the record, "group" needs a vector the same length as your number of samples, so in your case it should be c("WT_4wks","MT_4wks", "MT_17wks", "MT_17wks"). I'll add a warning about that in plotCtOverview, but I don't think that's the cause of the problem here. What do you get if you say summary(s2010004660)? I can't reproduce this behaviour with any of the data I have, but if you don't mind sending my your qPCRset (off list), then perhaps I can have a lot at if directly. \Heidi > It makes a plot but without error bars. > > Yes, there are replicates: > > Each card (stock ABI item) has 4 duplicates of the control. > > > exprs(s2010004660)[grep("U6",featureNames(s2010004660)),] > WT_4wks MT_4wks WT_17wks MT_17wks > MammU6-4395470 17.06939 17.18261 17.31673 17.11643 > MammU6-4395470 17.15968 17.25446 17.31998 17.10729 > MammU6-4395470 17.06865 17.07786 17.22182 17.02346 > MammU6-4395470 17.20133 17.17483 17.11134 16.96466 > MammU6-4395470 17.99183 17.92814 18.57421 18.11891 > MammU6-4395470 17.72530 17.83194 18.60460 17.95789 > MammU6-4395470 17.98547 17.90774 18.75409 18.00277 > MammU6-4395470 17.88600 17.96328 18.40904 18.12783 > > With stats: > > > colMeans(exprs(s2010004660)[grep("U6",featureNames(s2010004660)),]) > WT_4wks MT_4wks WT_17wks MT_17wks > 17.51096 17.54011 17.91398 17.55241 > > sd(exprs(s2010004660)[grep("U6",featureNames(s2010004660)),]) > WT_4wks MT_4wks WT_17wks MT_17wks > 0.4230635 0.3975762 0.7266933 0.5388762 > > Mike > >> >> \Heidi >> >>> Thanks again for the package and the help >>> >>> Mike >>>> >>>> \Heidi >>>> >>>>> Here's session info: >>>>> >>>>>> sessionInfo() >>>>> R version 2.11.0 (2010-04-22) >>>>> i386-apple-darwin9.8.0 >>>>> >>>>> locale: >>>>> [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 >>>>> >>>>> attached base packages: >>>>> [1] stats graphics grDevices utils datasets methods >>>>> base >>>>> >>>>> other attached packages: >>>>> [1] HTqPCR_1.2.0 limma_3.4.0 RColorBrewer_1.0-2 >>>>> Biobase_2.8.0 MASS_7.3-5 >>>>> >>>>> loaded via a namespace (and not attached): >>>>> [1] affy_1.26.0 affyio_1.16.0 gdata_2.7.1 >>>>> gplots_2.7.4 gtools_2.6.1 preprocessCore_1.10.0 >>>>> [7] tools_2.11.0 >>>>> >>>>> Thanks >>>>> >>>>> Mike >>>>> >>>>> Michael Muratet, Ph.D. >>>>> Senior Scientist >>>>> HudsonAlpha Institute for Biotechnology >>>>> mmuratet at hudsonalpha.org >>>>> (256) 327-0473 (p) >>>>> (256) 327-0966 (f) >>>>> >>>>> Room 4005 >>>>> 601 Genome Way >>>>> Huntsville, Alabama 35806 >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> >>> Michael Muratet, Ph.D. >>> Senior Scientist >>> HudsonAlpha Institute for Biotechnology >>> mmuratet at hudsonalpha.org >>> (256) 327-0473 (p) >>> (256) 327-0966 (f) >>> >>> Room 4005 >>> 601 Genome Way >>> Huntsville, Alabama 35806 >>> >>> >>> >>> >>> >> >> > > Michael Muratet, Ph.D. > Senior Scientist > HudsonAlpha Institute for Biotechnology > mmuratet at hudsonalpha.org > (256) 327-0473 (p) > (256) 327-0966 (f) > > Room 4005 > 601 Genome Way > Huntsville, Alabama 35806 > > > > >
HTqPCR HTqPCR • 930 views
ADD COMMENT
0
Entering edit mode
@michael-muratet-3076
Last seen 10.2 years ago
On May 2, 2010, at 3:26 AM, Heidi Dvinge wrote: >> >> On Apr 30, 2010, at 3:08 PM, Heidi Dvinge wrote: >> >>>> >>>> On Apr 30, 2010, at 2:42 PM, Heidi Dvinge wrote: >>>> >>>>> Hello Mike, >>>>> >>>>>> Greetings >>>>>> >>>>>> I have R 2.11, BioC 2.6 and HTqPCR 1.2 (see session info at the >>>>>> end). >>>>>> >>>>>> I created a qPCRset object by using rbind() to concatenate four >>>>>> pairs >>>>>> of dissimilar cards for each experimental condition and then >>>>>> cbind() >>>>>> to concatenate the four objects into one: >>>>>> >>>>>> WT_time1.a | >>>>>> WT_time1.b |---> WT_time1 >>>>>> MT_time1.a | >>>>>> MT_time1.b |---> MT_time1 >>>>>> WT_time2.a | ---> s2010004660 >>>>>> WT_time2.b |---> WT_time2 >>>>>> MT_time2.a | >>>>>> MT_time2.b |---> MT_time2 >>>>>> >>>>>> I set g <- c("MammU6") which is a endogenous control gene. >>>>>> >>>>>> I then tried to plotCtOverview(s2010004660, genes=g, >>>>>> groups=sampleNames(qPCRset), conf.int=TRUE) and got >>>>>> >>>>>>> plotCtOverview(s2010004660, genes=g, conf.int=TRUE) >>>>>> Error in if (del == 0 && to == 0) return(to) : >>>>>> missing value where TRUE/FALSE needed >>>>>> >>>>>> Here's the object info: >>>>>> >>>>>>> s2010004660 >>>>>> An object of class "qPCRset" >>>>>> Size: 768 features, 4 samples >>>>>> Feature types: Endogenous Control, Target >>>>>> Feature names: mmu-let-7b-4373168 mmu-let-7c-4373167 mmu- >>>>>> let-7d-4395394 ... >>>>>> Feature classes: >>>>>> Feature categories: OK, Undetermined >>>>>> Sample names: WT_4wks MT_4wks WT_17wks ... >>>>>> >>>>>> Could it be that the Feature classes slot is empty? >>>>>> >>>>> Feature classes shouldn't matter at all here. I can reproduce this >>>>> using >>>>> the data sets included in HTqPCR (qPCRraw and qPCRpros) though. >>>>> What >>>>> does >>>>> traceback() say? And does the same happen when you use >>>>> conf.int=FALSE? >>>> >>>> Thanks Heidi >>>> >>>> Here's the traceback(): >>>> >>>>> plotCtOverview(s2010004660, genes=g, conf.int=TRUE) >>>> Error in if (del == 0 && to == 0) return(to) : >>>> missing value where TRUE/FALSE needed >>>>> traceback() >>>> 3: seq.default(1.5, ncol(SD) * (nrow(SD) + 1), nrow(SD) + 1) >>>> 2: seq(1.5, ncol(SD) * (nrow(SD) + 1), nrow(SD) + 1) >>>> 1: plotCtOverview(s2010004660, genes = g, conf.int = TRUE) >>>> >>>> conf.int = FALSE it makes the plot without complaining. Actually, >>>> it >>>> makes the plot in the first case, too, it just doesn't draw error >>>> bars. >>>> >>> Hm, so for some reason it can't calculate a standard deviation for >>> your >>> qPCRset. However it should work even if SD returns NA. >>> >>> Do your have replicate genes in your set? And what happens if you >>> say e.g. >>> groups=c("A", "A", "B", "B")? >> Heidi >> >> I see the same problem. >> >>> plotCtOverview(s2010004660, genes=g, >> groups=c("WT_4wks"),conf.int=TRUE,replicates=TRUE) >> Error in if (del == 0 && to == 0) return(to) : >> missing value where TRUE/FALSE needed >>> plotCtOverview(s2010004660, genes=g, >> groups=c("WT_4wks","MT_4wks"),conf.int=TRUE,replicates=TRUE) >> Error in if (del == 0 && to == 0) return(to) : >> missing value where TRUE/FALSE needed >> > Just for the record, "group" needs a vector the same length as your > number > of samples, so in your case it should be c("WT_4wks","MT_4wks", > "MT_17wks", "MT_17wks"). I'll add a warning about that in > plotCtOverview, > but I don't think that's the cause of the problem here. What do you > get if > you say summary(s2010004660)? Hi Heidi I don't understand the purpose and function of 'group'. What would be the effect, for example, of having four identical sample labels? I tried using the default and I tried setting it to the sample IDs (all four) and got the same error. > > I can't reproduce this behaviour with any of the data I have, but if > you > don't mind sending my your qPCRset (off list), then perhaps I can > have a > lot at if directly. I'll send it off directly. Thanks Mike > > \Heidi > >> It makes a plot but without error bars. >> >> Yes, there are replicates: >> >> Each card (stock ABI item) has 4 duplicates of the control. >> >>> exprs(s2010004660)[grep("U6",featureNames(s2010004660)),] >> WT_4wks MT_4wks WT_17wks MT_17wks >> MammU6-4395470 17.06939 17.18261 17.31673 17.11643 >> MammU6-4395470 17.15968 17.25446 17.31998 17.10729 >> MammU6-4395470 17.06865 17.07786 17.22182 17.02346 >> MammU6-4395470 17.20133 17.17483 17.11134 16.96466 >> MammU6-4395470 17.99183 17.92814 18.57421 18.11891 >> MammU6-4395470 17.72530 17.83194 18.60460 17.95789 >> MammU6-4395470 17.98547 17.90774 18.75409 18.00277 >> MammU6-4395470 17.88600 17.96328 18.40904 18.12783 >> >> With stats: >> >>> colMeans(exprs(s2010004660)[grep("U6",featureNames(s2010004660)),]) >> WT_4wks MT_4wks WT_17wks MT_17wks >> 17.51096 17.54011 17.91398 17.55241 >>> sd(exprs(s2010004660)[grep("U6",featureNames(s2010004660)),]) >> WT_4wks MT_4wks WT_17wks MT_17wks >> 0.4230635 0.3975762 0.7266933 0.5388762 >> >> Mike >> >>> >>> \Heidi >>> >>>> Thanks again for the package and the help >>>> >>>> Mike >>>>> >>>>> \Heidi >>>>> >>>>>> Here's session info: >>>>>> >>>>>>> sessionInfo() >>>>>> R version 2.11.0 (2010-04-22) >>>>>> i386-apple-darwin9.8.0 >>>>>> >>>>>> locale: >>>>>> [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 >>>>>> >>>>>> attached base packages: >>>>>> [1] stats graphics grDevices utils datasets methods >>>>>> base >>>>>> >>>>>> other attached packages: >>>>>> [1] HTqPCR_1.2.0 limma_3.4.0 RColorBrewer_1.0-2 >>>>>> Biobase_2.8.0 MASS_7.3-5 >>>>>> >>>>>> loaded via a namespace (and not attached): >>>>>> [1] affy_1.26.0 affyio_1.16.0 gdata_2.7.1 >>>>>> gplots_2.7.4 gtools_2.6.1 preprocessCore_1.10.0 >>>>>> [7] tools_2.11.0 >>>>>> >>>>>> Thanks >>>>>> >>>>>> Mike >>>>>> >>>>>> Michael Muratet, Ph.D. >>>>>> Senior Scientist >>>>>> HudsonAlpha Institute for Biotechnology >>>>>> mmuratet at hudsonalpha.org >>>>>> (256) 327-0473 (p) >>>>>> (256) 327-0966 (f) >>>>>> >>>>>> Room 4005 >>>>>> 601 Genome Way >>>>>> Huntsville, Alabama 35806 >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> Michael Muratet, Ph.D. >>>> Senior Scientist >>>> HudsonAlpha Institute for Biotechnology >>>> mmuratet at hudsonalpha.org >>>> (256) 327-0473 (p) >>>> (256) 327-0966 (f) >>>> >>>> Room 4005 >>>> 601 Genome Way >>>> Huntsville, Alabama 35806 >>>> >>>> >>>> >>>> >>>> >>> >>> >> >> Michael Muratet, Ph.D. >> Senior Scientist >> HudsonAlpha Institute for Biotechnology >> mmuratet at hudsonalpha.org >> (256) 327-0473 (p) >> (256) 327-0966 (f) >> >> Room 4005 >> 601 Genome Way >> Huntsville, Alabama 35806 >> >> >> >> >> > > Michael Muratet, Ph.D. Senior Scientist HudsonAlpha Institute for Biotechnology mmuratet at hudsonalpha.org (256) 327-0473 (p) (256) 327-0966 (f) Room 4005 601 Genome Way Huntsville, Alabama 35806
ADD COMMENT
0
Entering edit mode
Hi Mike, congratulations, you hereby have the dubious honour of having uncovered the most obscure bug in HTqPCR yet. [snip] >>>> plotCtOverview(s2010004660, genes=g, >>> groups=c("WT_4wks"),conf.int=TRUE,replicates=TRUE) >>> Error in if (del == 0 && to == 0) return(to) : >>> missing value where TRUE/FALSE needed >>>> plotCtOverview(s2010004660, genes=g, >>> groups=c("WT_4wks","MT_4wks"),conf.int=TRUE,replicates=TRUE) >>> Error in if (del == 0 && to == 0) return(to) : >>> missing value where TRUE/FALSE needed >>> >> Just for the record, "group" needs a vector the same length as >> your number >> of samples, so in your case it should be c("WT_4wks","MT_4wks", >> "MT_17wks", "MT_17wks"). I'll add a warning about that in >> plotCtOverview, >> but I don't think that's the cause of the problem here. What do >> you get if >> you say summary(s2010004660)? > Hi Heidi > > I don't understand the purpose and function of 'group'. What would > be the effect, for example, of having four identical sample labels? > I tried using the default and I tried setting it to the sample IDs > (all four) and got the same error. The purpose of the group parameter is to tell plotCtOverview if any of the sample should be treated as biological replicates, in addition to the technical replicates that might be present on each plate. So if you have e.g. 4 samples and say groups=c("A", "B", "C", "D") then they're each treated individually, and only replicates features on each plate are considered. However, if you say e.g. groups=c("WT", "WT", "WT", "mutant"), then the first 3 are treated as biological replicates; hence for each gene you get one bar for WT and one for mutant. However, it turns out that plotCtOverview can't handle sampleNames or items in "group" containing a capital M... I'll get that fixed obviously, but in the meantime here's what you can do: genes <- c("snoRNA135-4380912", "snoRNA202-4380914", "snoRNA429-4386732") groups <- c("WT_4wks", "mt_4wks", "WT_17wks", "mt_17wks") # use mt instead of MT plotCtOverview(s2010004660, genes=genes, conf.int=TRUE, groups=groups, xlim=c(0,22)) Note that I've adjusted the xlim in this case to make the legend fit in and not overlap with the bars. This could also be done by adjusting the y scale: plotCtOverview(s2010004660, genes=genes, conf.int=TRUE, groups=groups, ylim=c(0,26)) Sorry for the hassle caused! \Heidi >> >> I can't reproduce this behaviour with any of the data I have, but >> if you >> don't mind sending my your qPCRset (off list), then perhaps I can >> have a >> lot at if directly. > I'll send it off directly. > > Thanks > > Mike >> >> \Heidi >> >>> It makes a plot but without error bars. >>> >>> Yes, there are replicates: >>> >>> Each card (stock ABI item) has 4 duplicates of the control. >>> >>>> exprs(s2010004660)[grep("U6",featureNames(s2010004660)),] >>> WT_4wks MT_4wks WT_17wks MT_17wks >>> MammU6-4395470 17.06939 17.18261 17.31673 17.11643 >>> MammU6-4395470 17.15968 17.25446 17.31998 17.10729 >>> MammU6-4395470 17.06865 17.07786 17.22182 17.02346 >>> MammU6-4395470 17.20133 17.17483 17.11134 16.96466 >>> MammU6-4395470 17.99183 17.92814 18.57421 18.11891 >>> MammU6-4395470 17.72530 17.83194 18.60460 17.95789 >>> MammU6-4395470 17.98547 17.90774 18.75409 18.00277 >>> MammU6-4395470 17.88600 17.96328 18.40904 18.12783 >>> >>> With stats: >>> >>>> colMeans(exprs(s2010004660)[grep("U6",featureNames(s2010004660)),]) >>> WT_4wks MT_4wks WT_17wks MT_17wks >>> 17.51096 17.54011 17.91398 17.55241 >>>> sd(exprs(s2010004660)[grep("U6",featureNames(s2010004660)),]) >>> WT_4wks MT_4wks WT_17wks MT_17wks >>> 0.4230635 0.3975762 0.7266933 0.5388762 >>> >>> Mike >>> >>>> >>>> \Heidi >>>> >>>>> Thanks again for the package and the help >>>>> >>>>> Mike >>>>>> >>>>>> \Heidi >>>>>> >>>>>>> Here's session info: >>>>>>> >>>>>>>> sessionInfo() >>>>>>> R version 2.11.0 (2010-04-22) >>>>>>> i386-apple-darwin9.8.0 >>>>>>> >>>>>>> locale: >>>>>>> [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 >>>>>>> >>>>>>> attached base packages: >>>>>>> [1] stats graphics grDevices utils datasets methods >>>>>>> base >>>>>>> >>>>>>> other attached packages: >>>>>>> [1] HTqPCR_1.2.0 limma_3.4.0 RColorBrewer_1.0-2 >>>>>>> Biobase_2.8.0 MASS_7.3-5 >>>>>>> >>>>>>> loaded via a namespace (and not attached): >>>>>>> [1] affy_1.26.0 affyio_1.16.0 gdata_2.7.1 >>>>>>> gplots_2.7.4 gtools_2.6.1 >>>>>>> preprocessCore_1.10.0 >>>>>>> [7] tools_2.11.0 >>>>>>> >>>>>>> Thanks >>>>>>> >>>>>>> Mike >>>>>>> >>>>>>> Michael Muratet, Ph.D. >>>>>>> Senior Scientist >>>>>>> HudsonAlpha Institute for Biotechnology >>>>>>> mmuratet at hudsonalpha.org >>>>>>> (256) 327-0473 (p) >>>>>>> (256) 327-0966 (f) >>>>>>> >>>>>>> Room 4005 >>>>>>> 601 Genome Way >>>>>>> Huntsville, Alabama 35806 >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> Michael Muratet, Ph.D. >>>>> Senior Scientist >>>>> HudsonAlpha Institute for Biotechnology >>>>> mmuratet at hudsonalpha.org >>>>> (256) 327-0473 (p) >>>>> (256) 327-0966 (f) >>>>> >>>>> Room 4005 >>>>> 601 Genome Way >>>>> Huntsville, Alabama 35806 >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> >>> Michael Muratet, Ph.D. >>> Senior Scientist >>> HudsonAlpha Institute for Biotechnology >>> mmuratet at hudsonalpha.org >>> (256) 327-0473 (p) >>> (256) 327-0966 (f) >>> >>> Room 4005 >>> 601 Genome Way >>> Huntsville, Alabama 35806 >>> >>> >>> >>> >>> >> >> > > Michael Muratet, Ph.D. > Senior Scientist > HudsonAlpha Institute for Biotechnology > mmuratet at hudsonalpha.org > (256) 327-0473 (p) > (256) 327-0966 (f) > > Room 4005 > 601 Genome Way > Huntsville, Alabama 35806 > > > >
ADD REPLY

Login before adding your answer.

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