HTqPCR: Calculate CV between replicates with in a plate
2
0
Entering edit mode
jeremy wilson ▴ 150
@jeremy-wilson-3700
Last seen 10.2 years ago
Dear list, I see that the package considers each plate as different sample and calculates CV for genes across plates (samples) but not with in a plate. Unfortunately my plate design is different. I have 384 well plates with 3 replicates for 32 genes in first 4 rows of the plate. Likewise other 3 samples in the next 3 sections of 4 rows. So in total I have 4 different clinical samples on a single plate. 32genes*3replicates*4samples=384 wells. Now I have gene 1 for sample 1 in first 3 wells of a plate. I want to calculate CV for this gene in 3 wells. Similarly for the remaining 32 genes of the sample. Like wise I need to calculate CV for the same genes in 3 more samples in the same plate. I see that the package has no function to calculate CVs for plate in this pattern. My apologies if I am missing any thing. I would really appreciate any suggestions or else I will have to write my own script to analyze my Hi-Throughput data. Thank you
• 1.3k views
ADD COMMENT
0
Entering edit mode
Heidi Dvinge ★ 2.0k
@heidi-dvinge-2195
Last seen 10.2 years ago
Hello Jeremy, there's no default way for calculating within-plate CVs in HTqPCR, since it'll depend on the exact layout of the plate. Below is an example of how this can be done, using the dataframe "design" to indicate how wells on the plate belong together. In your case it might be different of course. How is this information stored in the input data files and/or the qPCRset object? > library(HTqPCR) > # Use test data from the package as example here, with 6 plates > data(qPCRraw) > sampleNames(qPCRraw) <- paste("Plate", 1:6, sep="") > # What's the order of genes/rep/samples > design <- data.frame(Sample=paste("S", rep(1:4, each=96), sep="_"), + Gene=paste("Gene", rep(rep(1:32, each=3),4), sep="_"), + Replicate=paste("Rep", rep(1:3, 128), sep="_")) > # Calculate the CV > sd.gene <- aggregate(exprs(qPCRraw), by=list(design$Sample, design$Gene), sd) > mean.gene <- aggregate(exprs(qPCRraw), by=list(design$Sample, design$Gene), mean) > cv.gene <- sd.gene[,-c(1:2)]/mean.gene[,-c(1:2)] > rownames(cv.gene) <- paste(sd.gene[,1], sd.gene[,2], sep=":") HTH \Heidi > Dear list, > > I see that the package considers each plate as different sample and > calculates CV for genes across plates (samples) but not with in a > plate. > Unfortunately my plate design is different. I have 384 well plates > with 3 replicates for 32 genes in first 4 rows of the plate. Likewise > other 3 samples in the next 3 sections of 4 rows. So in total I have 4 > different clinical samples on a single plate. > 32genes*3replicates*4samples=384 wells. > Now I have gene 1 for sample 1 in first 3 wells of a plate. I want to > calculate CV for this gene in 3 wells. Similarly for the remaining 32 > genes of the sample. Like wise I need to calculate CV for the same > genes in 3 more samples in the same plate. I see that the package has > no function to calculate CVs for plate in this pattern. My apologies > if I am missing any thing. I would really appreciate any suggestions > or else I will have to write my own script to analyze my Hi- Throughput > data. > > Thank you > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENT
0
Entering edit mode
Thanks for your reply Dr.Heidi, the input files are from ABI RQ analysis (tab delimited text files). I can directly read these files using the readCtData function. I see discussions about not able to read files from RQ analysis output if the text file is a compilation of more than 1 sample. I have the same problem. I use the development version of R and the HTqPCR. Please let me know if I am doing anything wrong. > dat = readCtData(files, path = path, SDS=TRUE, header=TRUE) > dat An object of class "qPCRset" Size: 384 features, 1 samples Feature types: Endogenous Control, Target Feature names: ITGA4-Hs00168433_m1 ITGA4-Hs00168433_m1 ITGA4-Hs00168433_m1 ... Feature classes: Feature categories: OK, Undetermined Sample names: Test2_multipleplates NA NA ... The file contains two plates (samples). It should show Size: 384 features, 2 samples sessionInfo() R version 2.11.0 Under development (unstable) (2010-02-10 r51118) i386-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] 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.1.0 limma_3.3.9 RColorBrewer_1.0-2 Biobase_2.7.4 loaded via a namespace (and not attached): [1] affy_1.25.2 affyio_1.15.2 gdata_2.7.1 [4] gplots_2.7.4 gtools_2.6.1 preprocessCore_1.9.0 [7] tools_2.11.0 Thank you On Sat, Feb 13, 2010 at 1:23 AM, Heidi Dvinge <heidi at="" ebi.ac.uk=""> wrote: > Hello Jeremy, > > there's no default way for calculating within-plate CVs in HTqPCR, since > it'll depend on the exact layout of the plate. Below is an example of how > this can be done, using the dataframe "design" to indicate how wells on > the plate belong together. In your case it might be different of course. > How is this information stored in the input data files and/or the qPCRset > object? > >> library(HTqPCR) >> # Use test data from the package as example here, with 6 plates >> data(qPCRraw) >> sampleNames(qPCRraw) ?<- paste("Plate", 1:6, sep="") >> # What's the order of genes/rep/samples >> design ? ? ? ?<- data.frame(Sample=paste("S", rep(1:4, each=96), sep="_"), > + ? ? ? ? ? ? ? Gene=paste("Gene", rep(rep(1:32, each=3),4), sep="_"), > + ? ? ? ? ? ? ? Replicate=paste("Rep", rep(1:3, 128), sep="_")) >> # Calculate the CV >> sd.gene ? ? ? <- aggregate(exprs(qPCRraw), by=list(design$Sample, > design$Gene), sd) >> mean.gene <- aggregate(exprs(qPCRraw), by=list(design$Sample, > design$Gene), mean) >> cv.gene ? ? ? <- sd.gene[,-c(1:2)]/mean.gene[,-c(1:2)] >> rownames(cv.gene) ? ? <- paste(sd.gene[,1], sd.gene[,2], sep=":") > > HTH > \Heidi > > >> Dear list, >> >> I see that the package considers each plate as different sample and >> calculates CV ?for genes across plates (samples) but not with in a >> plate. >> Unfortunately my plate design is different. I have 384 well plates >> with 3 replicates for 32 genes in first 4 rows of the plate. Likewise >> other 3 samples in the next 3 sections of 4 rows. So in total I have 4 >> different clinical samples on a single plate. >> 32genes*3replicates*4samples=384 wells. >> Now I have gene 1 for sample 1 in first 3 wells of a plate. I want to >> calculate CV for this gene in 3 wells. Similarly for the remaining 32 >> genes of the sample. Like wise I need to calculate CV for the same >> genes in 3 more samples in the same plate. I see that the package has >> no function to calculate CVs for plate in this pattern. My apologies >> if I am missing any thing. I would really appreciate any suggestions >> or else I will have to write my own script to analyze my Hi- Throughput >> data. >> >> Thank you >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> > > >
ADD REPLY
0
Entering edit mode
Hello Jeremy, you'll need to tell readCtData how many samples are in each of your files, using the n.data argument. In your case it sounds like the command should be: > dat = readCtData(files, path = path, SDS=TRUE, header=TRUE, n.data=2) If you have multiple files, this could e.g. be: > dat = readCtData(c("file1", "file2", "file3"), path = path, SDS=TRUE, header=TRUE, n.data=c(6,1,2)) Please let me know if this doesn't work. The reason for doing it this way is that SDS files typically contain some additional information at the end after the actual data. Reading the entire file might mess things up a bit, so instead readCtData just takes the first n.data*n.features lines after the header from the file. HTH \Heidi > Thanks for your reply Dr.Heidi, > > the input files are from ABI RQ analysis (tab delimited text files). I > can directly read these files using the readCtData function. > I see discussions about not able to read files from RQ analysis output > if the text file is a compilation of more than 1 sample. I have the > same problem. I use the development version of R and the HTqPCR. > Please let me know if I am doing anything wrong. > >> dat = readCtData(files, path = path, SDS=TRUE, header=TRUE) >> dat > An object of class "qPCRset" > Size: 384 features, 1 samples > Feature types: Endogenous Control, Target > Feature names: ITGA4-Hs00168433_m1 ITGA4-Hs00168433_m1 > ITGA4-Hs00168433_m1 ... > Feature classes: > Feature categories: OK, Undetermined > Sample names: Test2_multipleplates NA NA ... > > The file contains two plates (samples). It should show Size: 384 > features, 2 samples > > sessionInfo() > R version 2.11.0 Under development (unstable) (2010-02-10 r51118) > i386-pc-mingw32 > > locale: > [1] LC_COLLATE=English_United States.1252 > [2] LC_CTYPE=English_United States.1252 > [3] LC_MONETARY=English_United States.1252 > [4] 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.1.0 limma_3.3.9 RColorBrewer_1.0-2 Biobase_2.7.4 > > loaded via a namespace (and not attached): > [1] affy_1.25.2 affyio_1.15.2 gdata_2.7.1 > [4] gplots_2.7.4 gtools_2.6.1 preprocessCore_1.9.0 > [7] tools_2.11.0 > > Thank you > > On Sat, Feb 13, 2010 at 1:23 AM, Heidi Dvinge <heidi at="" ebi.ac.uk=""> wrote: >> Hello Jeremy, >> >> there's no default way for calculating within-plate CVs in HTqPCR, since >> it'll depend on the exact layout of the plate. Below is an example of >> how >> this can be done, using the dataframe "design" to indicate how wells on >> the plate belong together. In your case it might be different of course. >> How is this information stored in the input data files and/or the >> qPCRset >> object? >> >>> library(HTqPCR) >>> # Use test data from the package as example here, with 6 plates >>> data(qPCRraw) >>> sampleNames(qPCRraw) ?<- paste("Plate", 1:6, sep="") >>> # What's the order of genes/rep/samples >>> design ? ? ? ?<- data.frame(Sample=paste("S", rep(1:4, each=96), >>> sep="_"), >> + ? ? ? ? ? ? ? Gene=paste("Gene", rep(rep(1:32, each=3),4), sep="_"), >> + ? ? ? ? ? ? ? Replicate=paste("Rep", rep(1:3, 128), sep="_")) >>> # Calculate the CV >>> sd.gene ? ? ? <- aggregate(exprs(qPCRraw), by=list(design$Sample, >> design$Gene), sd) >>> mean.gene <- aggregate(exprs(qPCRraw), by=list(design$Sample, >> design$Gene), mean) >>> cv.gene ? ? ? <- sd.gene[,-c(1:2)]/mean.gene[,-c(1:2)] >>> rownames(cv.gene) ? ? <- paste(sd.gene[,1], sd.gene[,2], sep=":") >> >> HTH >> \Heidi >> >> >>> Dear list, >>> >>> I see that the package considers each plate as different sample and >>> calculates CV ?for genes across plates (samples) but not with in a >>> plate. >>> Unfortunately my plate design is different. I have 384 well plates >>> with 3 replicates for 32 genes in first 4 rows of the plate. Likewise >>> other 3 samples in the next 3 sections of 4 rows. So in total I have 4 >>> different clinical samples on a single plate. >>> 32genes*3replicates*4samples=384 wells. >>> Now I have gene 1 for sample 1 in first 3 wells of a plate. I want to >>> calculate CV for this gene in 3 wells. Similarly for the remaining 32 >>> genes of the sample. Like wise I need to calculate CV for the same >>> genes in 3 more samples in the same plate. I see that the package has >>> no function to calculate CVs for plate in this pattern. My apologies >>> if I am missing any thing. I would really appreciate any suggestions >>> or else I will have to write my own script to analyze my Hi- Throughput >>> data. >>> >>> Thank you >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor at stat.math.ethz.ch >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: >>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>> >> >> >> > ------------------//------------------ Heidi Dvinge European Bioinformatics Institute Wellcome Trust Genome Campus Cambridge, CB10 1SD heidi at ebi.ac.uk
ADD REPLY
0
Entering edit mode
Heidi Dvinge ★ 2.0k
@heidi-dvinge-2195
Last seen 10.2 years ago
Hello Jeremy, > Hi Heidi, > > I saw in your earlier emails also about n.data (new option) but it is > not working even when I am using the development versions...Also there > is no documentation about this new option on readCtData function. >From your sessionInfo it looks like you have the development version of R, but your HTqPCR package is still 1.1.0, which is the release version. Try updating your packages with source("http://bioconductor.org/biocLite.R") update.packages(repos=biocinstallRepos(), ask=TRUE) After that your should have HTqPCR version 1.1.3, where the readCtData has the argument n.data. This is also mentioned in the corresponding help file in that package version. > I do not understand n.data=c(6,1,2) . In the example I gave it means that the first file contains data from 6 plates (6x384 lines), the second file only data from 1 sample (384 lines) and the third file has 2 plates in it (2x384 lines). When analysing qPCR data with the SDS software it's possible to export the results from each 384 well plate either individually, or in groups depending on what plate results you have open at that moment. Each file can therefore contain Ct data from a very variable number of plates. > what do these numbers represent. > If I have 6 plates, is it not just n.data=6? > If all the 6 plates are in one file, then yes. If there in 6 individual files, then it's n.data=c(1,1,1,1,1,1); which can be written n.data=1 for short when all files contain results from the same number of qPCR plates. HTH \Heidi > dat = readCtData(files, path = path, SDS=TRUE, header=TRUE, n.data=2) >> dat > An object of class "qPCRset" > Size: 384 features, 1 samples > Feature types: Endogenous Control, Target > Feature names: ITGA4-Hs00168433_m1 ITGA4-Hs00168433_m1 > ITGA4-Hs00168433_m1 ... > Feature classes: > Feature categories: OK, Undetermined > Sample names: Test2_multipleplates NA NA ... > > >> sessionInfo() > R version 2.11.0 Under development (unstable) (2010-02-10 r51118) > i386-pc-mingw32 > > locale: > [1] LC_COLLATE=English_United States.1252 > [2] LC_CTYPE=English_United States.1252 > [3] LC_MONETARY=English_United States.1252 > [4] 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.1.0 limma_3.3.9 RColorBrewer_1.0-2 Biobase_2.7.4 > > loaded via a namespace (and not attached): > [1] affy_1.25.2 affyio_1.15.2 gdata_2.7.1 > [4] gplots_2.7.4 gtools_2.6.1 preprocessCore_1.9.0 > [7] tools_2.11.0 > > > > Thank you > > > On Tue, Feb 16, 2010 at 2:17 PM, Heidi Dvinge <heidi at="" ebi.ac.uk=""> wrote: >> Hello Jeremy, >> >> you'll need to tell readCtData how many samples are in each of your >> files, >> using the n.data argument. In your case it sounds like the command >> should >> be: >> >>> dat = readCtData(files, path = path, SDS=TRUE, header=TRUE, n.data=2) >> >> If you have multiple files, this could e.g. be: >> >>> dat = readCtData(c("file1", "file2", "file3"), path = path, SDS=TRUE, >> header=TRUE, n.data=c(6,1,2)) >> >> Please let me know if this doesn't work. >> >> The reason for doing it this way is that SDS files typically contain >> some >> additional information at the end after the actual data. Reading the >> entire file might mess things up a bit, so instead readCtData just takes >> the first n.data*n.features lines after the header from the file. >> >> HTH >> \Heidi >> >> >>> Thanks for your reply Dr.Heidi, >>> >>> the input files are from ABI RQ analysis (tab delimited text files). I >>> can directly read these files using the readCtData function. >>> I see discussions about not able to read files from RQ analysis output >>> if the text file is a compilation of more than 1 sample. I have the >>> same problem. I use the development version of R and the HTqPCR. >>> Please let me know if I am doing anything wrong. >>> >>>> dat = readCtData(files, path = path, SDS=TRUE, header=TRUE) >>>> dat >>> An object of class "qPCRset" >>> Size: ?384 features, 1 samples >>> Feature types: ? ? ? ? ? Endogenous Control, Target >>> Feature names: ? ? ? ? ? ITGA4-Hs00168433_m1 ITGA4-Hs00168433_m1 >>> ITGA4-Hs00168433_m1 ... >>> Feature classes: >>> Feature categories: ? ? ?OK, Undetermined >>> Sample names: ? ? ? ? ? ?Test2_multipleplates NA NA ... >>> >>> The file contains two plates (samples). It should show Size: ?384 >>> features, 2 samples >>> >>> ?sessionInfo() >>> R version 2.11.0 Under development (unstable) (2010-02-10 r51118) >>> i386-pc-mingw32 >>> >>> locale: >>> [1] LC_COLLATE=English_United States.1252 >>> [2] LC_CTYPE=English_United States.1252 >>> [3] LC_MONETARY=English_United States.1252 >>> [4] 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.1.0 ? ? ? limma_3.3.9 ? ? ? ?RColorBrewer_1.0-2 >>> Biobase_2.7.4 >>> >>> loaded via a namespace (and not attached): >>> [1] affy_1.25.2 ? ? ? ? ?affyio_1.15.2 ? ? ? ?gdata_2.7.1 >>> [4] gplots_2.7.4 ? ? ? ? gtools_2.6.1 ? ? ? ? preprocessCore_1.9.0 >>> [7] tools_2.11.0 >>> >>> Thank you >>> >>> On Sat, Feb 13, 2010 at 1:23 AM, Heidi Dvinge <heidi at="" ebi.ac.uk=""> wrote: >>>> Hello Jeremy, >>>> >>>> there's no default way for calculating within-plate CVs in HTqPCR, >>>> since >>>> it'll depend on the exact layout of the plate. Below is an example of >>>> how >>>> this can be done, using the dataframe "design" to indicate how wells >>>> on >>>> the plate belong together. In your case it might be different of >>>> course. >>>> How is this information stored in the input data files and/or the >>>> qPCRset >>>> object? >>>> >>>>> library(HTqPCR) >>>>> # Use test data from the package as example here, with 6 plates >>>>> data(qPCRraw) >>>>> sampleNames(qPCRraw) ?<- paste("Plate", 1:6, sep="") >>>>> # What's the order of genes/rep/samples >>>>> design ? ? ? ?<- data.frame(Sample=paste("S", rep(1:4, each=96), >>>>> sep="_"), >>>> + ? ? ? ? ? ? ? Gene=paste("Gene", rep(rep(1:32, each=3),4), sep="_"), >>>> + ? ? ? ? ? ? ? Replicate=paste("Rep", rep(1:3, 128), sep="_")) >>>>> # Calculate the CV >>>>> sd.gene ? ? ? <- aggregate(exprs(qPCRraw), by=list(design$Sample, >>>> design$Gene), sd) >>>>> mean.gene <- aggregate(exprs(qPCRraw), by=list(design$Sample, >>>> design$Gene), mean) >>>>> cv.gene ? ? ? <- sd.gene[,-c(1:2)]/mean.gene[,-c(1:2)] >>>>> rownames(cv.gene) ? ? <- paste(sd.gene[,1], sd.gene[,2], sep=":") >>>> >>>> HTH >>>> \Heidi >>>> >>>> >>>>> Dear list, >>>>> >>>>> I see that the package considers each plate as different sample and >>>>> calculates CV ?for genes across plates (samples) but not with in a >>>>> plate. >>>>> Unfortunately my plate design is different. I have 384 well plates >>>>> with 3 replicates for 32 genes in first 4 rows of the plate. Likewise >>>>> other 3 samples in the next 3 sections of 4 rows. So in total I have >>>>> 4 >>>>> different clinical samples on a single plate. >>>>> 32genes*3replicates*4samples=384 wells. >>>>> Now I have gene 1 for sample 1 in first 3 wells of a plate. I want to >>>>> calculate CV for this gene in 3 wells. Similarly for the remaining 32 >>>>> genes of the sample. Like wise I need to calculate CV for the same >>>>> genes in 3 more samples in the same plate. I see that the package has >>>>> no function to calculate CVs for plate in this pattern. My apologies >>>>> if I am missing any thing. I would really appreciate any suggestions >>>>> or else I will have to write my own script to analyze my >>>>> Hi-Throughput >>>>> data. >>>>> >>>>> Thank you >>>>> >>>>> _______________________________________________ >>>>> Bioconductor mailing list >>>>> Bioconductor at stat.math.ethz.ch >>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>>> Search the archives: >>>>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>>>> >>>> >>>> >>>> >>> >> >> >> ------------------//------------------ >> ?Heidi Dvinge >> >> European Bioinformatics Institute >> Wellcome Trust Genome Campus >> Cambridge, CB10 1SD >> heidi at ebi.ac.uk >> ------------------//------------------ >> >> >
ADD COMMENT

Login before adding your answer.

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