edgeR - tagwise dispersion
2
0
Entering edit mode
@sridhara-gupta-kunjeti-4449
Last seen 9.7 years ago
United States
Hi, I am using edgeR for DGE analysis and I have two samples with two replication. I was successful in passing through the following codes > setwd("C:/Users/SRIDHARA/Documents/Sequence analysis/02-Pphaseoli") > targets <- read.delim(file = "targets.txt", stringsAsFactors = FALSE) > targets <- read.delim(file = "targetsF0P6.txt", stringsAsFactors = FALSE) > targets > d <- readDGE(targets, header = FALSE) > d and then when I used TagWisedispersion, I get the following error message > d <- estimateTagwiseDisp(d, prior.n = 10) Error in t.default(object$counts) : argument is not a matrix I was not sure, if I need to do > d <- estimateCommonDisp(d) AND then > d <- estimateTagwiseDisp(d, prior.n = 10) if I do this way, I do not get any error message. BUT I think, TagwiseDisp should work without calculating CommonDisp. Any suggestions will be highly appreciated. Thanks, Sridhara -- Sridhara G Kunjeti PhD Candidate University of Delaware Department of Plant and Soil Science email- sridhara@udel.edu Ph: 832-566-0011 [[alternative HTML version deleted]]
edgeR edgeR • 2.6k views
ADD COMMENT
0
Entering edit mode
@davis-mccarthy-4138
Last seen 10.2 years ago
Hi Sridhara Thanks for reporting this bug - it is a known issue (and indeed resolved in the devel version of edgeR). The expected edgeR pipeline has been for the user to call estimateCommonDisp() first, then call estimateTagwiseDisp() subsequently if desired. The reason for this is that to estimate tagwise dispersions we require results computed by estimateCommonDisp(). However, it is certainly reasonable to expect estimateTagwiseDisp() to run even if estimateCommonDisp() has not been run - this has been changed in the current devel version of edgeR on Bioconductor. With this change, estimateTagwiseDisp() will internally call estimateCommonDisp() if it detects that estimateCommonDisp() has not already been run on the DGEList object. In terms of computation time there is no difference whether you call estimateCommonDisp() before estimateTagwiseDisp() or not. The common dispersion does provide information about the overall extent of difference between replicate libraries, so personally I like to have a look at this value whenever carrying out an analysis, before going on to use the tagwise dispersions. For your purpose, either run estimateCommonDisp() before estimateTagwiseDisp() with the release version, or get hold of the devel version. Best regards Davis On Mar 4, 2011, at 1:03 PM, Sridhara Gupta Kunjeti wrote: > Hi, > I am using edgeR for DGE analysis and I have two samples with two > replication. > > I was successful in passing through the following codes >> setwd("C:/Users/SRIDHARA/Documents/Sequence analysis/02-Pphaseoli") >> targets <- read.delim(file = "targets.txt", stringsAsFactors = FALSE) >> targets <- read.delim(file = "targetsF0P6.txt", stringsAsFactors = FALSE) >> targets >> d <- readDGE(targets, header = FALSE) >> d > > and then when I used TagWisedispersion, I get the following error message >> d <- estimateTagwiseDisp(d, prior.n = 10) > Error in t.default(object$counts) : argument is not a matrix > > I was not sure, if I need to do >> d <- estimateCommonDisp(d) > AND then >> d <- estimateTagwiseDisp(d, prior.n = 10) > if I do this way, I do not get any error message. BUT I think, TagwiseDisp > should work without calculating CommonDisp. > Any suggestions will be highly appreciated. > > Thanks, > Sridhara > > -- > Sridhara G Kunjeti > PhD Candidate > University of Delaware > Department of Plant and Soil Science > email- sridhara at udel.edu > Ph: 832-566-0011 > > [[alternative HTML version deleted]] > > _______________________________________________ > 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 ---------------------------------------------------------------------- -- Davis J McCarthy Research Technician Bioinformatics Division Walter and Eliza Hall Institute of Medical Research 1G Royal Parade, Parkville, Vic 3052, Australia dmccarthy at wehi.edu.au http://www.wehi.edu.au ______________________________________________________________________ The information in this email is confidential and intend...{{dropped:6}}
ADD COMMENT
0
Entering edit mode
Mark Robinson ★ 1.1k
@mark-robinson-2171
Last seen 10.2 years ago
Hi Sridhara. You do need to run estimateCommonDisp() before estimateTagwiseDisp(). We've modified the code now to detect whether it has been run and if not, invisibly call it. Mark On 2011-03-04, at 1:03 PM, Sridhara Gupta Kunjeti wrote: > Hi, > I am using edgeR for DGE analysis and I have two samples with two > replication. > > I was successful in passing through the following codes >> setwd("C:/Users/SRIDHARA/Documents/Sequence analysis/02-Pphaseoli") >> targets <- read.delim(file = "targets.txt", stringsAsFactors = FALSE) >> targets <- read.delim(file = "targetsF0P6.txt", stringsAsFactors = FALSE) >> targets >> d <- readDGE(targets, header = FALSE) >> d > > and then when I used TagWisedispersion, I get the following error message >> d <- estimateTagwiseDisp(d, prior.n = 10) > Error in t.default(object$counts) : argument is not a matrix > > I was not sure, if I need to do >> d <- estimateCommonDisp(d) > AND then >> d <- estimateTagwiseDisp(d, prior.n = 10) > if I do this way, I do not get any error message. BUT I think, TagwiseDisp > should work without calculating CommonDisp. > Any suggestions will be highly appreciated. > > Thanks, > Sridhara > > -- > Sridhara G Kunjeti > PhD Candidate > University of Delaware > Department of Plant and Soil Science > email- sridhara at udel.edu > Ph: 832-566-0011 > > [[alternative HTML version deleted]] > > _______________________________________________ > 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 ------------------------------ Mark Robinson, PhD (Melb) Epigenetics Laboratory, Garvan Bioinformatics Division, WEHI e: mrobinson at wehi.edu.au e: m.robinson at garvan.org.au p: +61 (0)3 9345 2628 f: +61 (0)3 9347 0852 ------------------------------ ______________________________________________________________________ The information in this email is confidential and intend...{{dropped:6}}
ADD COMMENT
0
Entering edit mode
Hello Davis and Mark, Thank you very much for your response! I will run first common dispersion and then tagwise dispersion. Many thanks! Sridhara On Thu, Mar 3, 2011 at 9:20 PM, Mark Robinson <mrobinson@wehi.edu.au> wrote: > Hi Sridhara. > > You do need to run estimateCommonDisp() before estimateTagwiseDisp(). > We've modified the code now to detect whether it has been run and if not, > invisibly call it. > > Mark > > On 2011-03-04, at 1:03 PM, Sridhara Gupta Kunjeti wrote: > > > Hi, > > I am using edgeR for DGE analysis and I have two samples with two > > replication. > > > > I was successful in passing through the following codes > >> setwd("C:/Users/SRIDHARA/Documents/Sequence analysis/02-Pphaseoli") > >> targets <- read.delim(file = "targets.txt", stringsAsFactors = FALSE) > >> targets <- read.delim(file = "targetsF0P6.txt", stringsAsFactors = > FALSE) > >> targets > >> d <- readDGE(targets, header = FALSE) > >> d > > > > and then when I used TagWisedispersion, I get the following error message > >> d <- estimateTagwiseDisp(d, prior.n = 10) > > Error in t.default(object$counts) : argument is not a matrix > > > > I was not sure, if I need to do > >> d <- estimateCommonDisp(d) > > AND then > >> d <- estimateTagwiseDisp(d, prior.n = 10) > > if I do this way, I do not get any error message. BUT I think, > TagwiseDisp > > should work without calculating CommonDisp. > > Any suggestions will be highly appreciated. > > > > Thanks, > > Sridhara > > > > -- > > Sridhara G Kunjeti > > PhD Candidate > > University of Delaware > > Department of Plant and Soil Science > > email- sridhara@udel.edu > > Ph: 832-566-0011 > > > > [[alternative HTML version deleted]] > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor@r-project.org > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > > ------------------------------ > Mark Robinson, PhD (Melb) > Epigenetics Laboratory, Garvan > Bioinformatics Division, WEHI > e: mrobinson@wehi.edu.au > e: m.robinson@garvan.org.au > p: +61 (0)3 9345 2628 > f: +61 (0)3 9347 0852 > ------------------------------ > > > ______________________________________________________________________ > The information in this email is confidential and inte...{{dropped:20}}
ADD REPLY
0
Entering edit mode
Hello Davis, I did run estimateCommonDisp() and then estimageTagwiseDisp(). AND also did the following codes: > dt06 <- estimateTagwiseDisp(d06, prior.n = 10) > names(dt06) > head(dt06$tagwise.dispersion) [1] 0.6054731 0.5433415 0.5083185 0.6054731 0.5553801 0.4640211 > summary(dt06$tagwise.dispersion) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.4122 0.4223 0.4428 0.4613 0.4748 1.1390 > d06$common.dispersion [1] 0.4588705 > prior.n06 <- estimateSmoothing(d06) > prior.n06 [1] 5.131239e-05 When I tried to run exactTest, I am getting the following error message: > de.tagwise06 <- exactTest(d06, common.disp = FALSE) Comparison of groups: PPLB6dpi - PhyP18 Error in q2qnbinom(object$counts, input.mean = input.mean, output.mean = output.mean, : dims [product 49700] do not match the length of object [0] I am curious what does it mean by "do not match the length of object[0]"? How this error can be fixed? Many thanks! Sridhara On Thu, Mar 3, 2011 at 9:26 PM, Sridhara Gupta Kunjeti <sridhara@udel.edu>wrote: > Hello Davis and Mark, > Thank you very much for your response! > I will run first common dispersion and then tagwise dispersion. > > Many thanks! > Sridhara > > > On Thu, Mar 3, 2011 at 9:20 PM, Mark Robinson <mrobinson@wehi.edu.au>wrote: > >> Hi Sridhara. >> >> You do need to run estimateCommonDisp() before estimateTagwiseDisp(). >> We've modified the code now to detect whether it has been run and if not, >> invisibly call it. >> >> Mark >> >> On 2011-03-04, at 1:03 PM, Sridhara Gupta Kunjeti wrote: >> >> > Hi, >> > I am using edgeR for DGE analysis and I have two samples with two >> > replication. >> > >> > I was successful in passing through the following codes >> >> setwd("C:/Users/SRIDHARA/Documents/Sequence analysis/02-Pphaseoli") >> >> targets <- read.delim(file = "targets.txt", stringsAsFactors = FALSE) >> >> targets <- read.delim(file = "targetsF0P6.txt", stringsAsFactors = >> FALSE) >> >> targets >> >> d <- readDGE(targets, header = FALSE) >> >> d >> > >> > and then when I used TagWisedispersion, I get the following error >> message >> >> d <- estimateTagwiseDisp(d, prior.n = 10) >> > Error in t.default(object$counts) : argument is not a matrix >> > >> > I was not sure, if I need to do >> >> d <- estimateCommonDisp(d) >> > AND then >> >> d <- estimateTagwiseDisp(d, prior.n = 10) >> > if I do this way, I do not get any error message. BUT I think, >> TagwiseDisp >> > should work without calculating CommonDisp. >> > Any suggestions will be highly appreciated. >> > >> > Thanks, >> > Sridhara >> > >> > -- >> > Sridhara G Kunjeti >> > PhD Candidate >> > University of Delaware >> > Department of Plant and Soil Science >> > email- sridhara@udel.edu >> > Ph: 832-566-0011 >> > >> > [[alternative HTML version deleted]] >> > >> > _______________________________________________ >> > Bioconductor mailing list >> > Bioconductor@r-project.org >> > https://stat.ethz.ch/mailman/listinfo/bioconductor >> > Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> ------------------------------ >> Mark Robinson, PhD (Melb) >> Epigenetics Laboratory, Garvan >> Bioinformatics Division, WEHI >> e: mrobinson@wehi.edu.au >> e: m.robinson@garvan.org.au >> p: +61 (0)3 9345 2628 >> f: +61 (0)3 9347 0852 >> ------------------------------ >> >> >> ______________________________________________________________________ >> The information in this email is confidential and intended solely for the >> addressee. >> You must not disclose, forward, print or use it without the permission of >> the sender. >> ______________________________________________________________________ >> > > > > -- > Sridhara G Kunjeti > PhD Candidate > University of Delaware > Department of Plant and Soil Science > email- sridhara@udel.edu > Ph: 832-566-0011 > -- Sridhara G Kunjeti PhD Candidate University of Delaware Department of Plant and Soil Science email- sridhara@udel.edu Ph: 832-566-0011 [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Maybe you've made a typo? How about trying: de.tagwise06 <- exactTest(dt06, common.disp = FALSE) ... since the 'd06' object doesn't have the tagwise dispersions. Also, when you report errors, it's handy to also give the output of traceback() and sessionInfo(). No need in this case, of course. Cheers, Mark On 2011-03-04, at 1:43 PM, Sridhara Gupta Kunjeti wrote: > Hello Davis, > I did run estimateCommonDisp() and then estimageTagwiseDisp(). AND also did the following codes: > > > dt06 <- estimateTagwiseDisp(d06, prior.n = 10) > > names(dt06) > > head(dt06$tagwise.dispersion) > [1] 0.6054731 0.5433415 0.5083185 0.6054731 0.5553801 0.4640211 > > summary(dt06$tagwise.dispersion) > Min. 1st Qu. Median Mean 3rd Qu. Max. > 0.4122 0.4223 0.4428 0.4613 0.4748 1.1390 > > d06$common.dispersion > [1] 0.4588705 > > prior.n06 <- estimateSmoothing(d06) > > prior.n06 > [1] 5.131239e-05 > > When I tried to run exactTest, I am getting the following error message: > > de.tagwise06 <- exactTest(d06, common.disp = FALSE) > Comparison of groups: PPLB6dpi - PhyP18 > Error in q2qnbinom(object$counts, input.mean = input.mean, output.mean = output.mean, : > dims [product 49700] do not match the length of object [0] > > I am curious what does it mean by "do not match the length of object[0]"? > How this error can be fixed? > > Many thanks! > Sridhara > > > > On Thu, Mar 3, 2011 at 9:26 PM, Sridhara Gupta Kunjeti <sridhara at="" udel.edu=""> wrote: > Hello Davis and Mark, > Thank you very much for your response! > I will run first common dispersion and then tagwise dispersion. > > Many thanks! > Sridhara > > > On Thu, Mar 3, 2011 at 9:20 PM, Mark Robinson <mrobinson at="" wehi.edu.au=""> wrote: > Hi Sridhara. > > You do need to run estimateCommonDisp() before estimateTagwiseDisp(). We've modified the code now to detect whether it has been run and if not, invisibly call it. > > Mark > > On 2011-03-04, at 1:03 PM, Sridhara Gupta Kunjeti wrote: > > > Hi, > > I am using edgeR for DGE analysis and I have two samples with two > > replication. > > > > I was successful in passing through the following codes > >> setwd("C:/Users/SRIDHARA/Documents/Sequence analysis/02-Pphaseoli") > >> targets <- read.delim(file = "targets.txt", stringsAsFactors = FALSE) > >> targets <- read.delim(file = "targetsF0P6.txt", stringsAsFactors = FALSE) > >> targets > >> d <- readDGE(targets, header = FALSE) > >> d > > > > and then when I used TagWisedispersion, I get the following error message > >> d <- estimateTagwiseDisp(d, prior.n = 10) > > Error in t.default(object$counts) : argument is not a matrix > > > > I was not sure, if I need to do > >> d <- estimateCommonDisp(d) > > AND then > >> d <- estimateTagwiseDisp(d, prior.n = 10) > > if I do this way, I do not get any error message. BUT I think, TagwiseDisp > > should work without calculating CommonDisp. > > Any suggestions will be highly appreciated. > > > > Thanks, > > Sridhara > > > > -- > > Sridhara G Kunjeti > > PhD Candidate > > University of Delaware > > Department of Plant and Soil Science > > email- sridhara at udel.edu > > Ph: 832-566-0011 > > > > [[alternative HTML version deleted]] > > > > _______________________________________________ > > 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 > > ------------------------------ > Mark Robinson, PhD (Melb) > Epigenetics Laboratory, Garvan > Bioinformatics Division, WEHI > e: mrobinson at wehi.edu.au > e: m.robinson at garvan.org.au > p: +61 (0)3 9345 2628 > f: +61 (0)3 9347 0852 > ------------------------------ > > > ______________________________________________________________________ > The information in this email is confidential and intended solely for the addressee. > You must not disclose, forward, print or use it without the permission of the sender. > ______________________________________________________________________ > > > > -- > Sridhara G Kunjeti > PhD Candidate > University of Delaware > Department of Plant and Soil Science > email- sridhara at udel.edu > Ph: 832-566-0011 > > > > -- > Sridhara G Kunjeti > PhD Candidate > University of Delaware > Department of Plant and Soil Science > email- sridhara at udel.edu > Ph: 832-566-0011 ------------------------------ Mark Robinson, PhD (Melb) Epigenetics Laboratory, Garvan Bioinformatics Division, WEHI e: mrobinson at wehi.edu.au e: m.robinson at garvan.org.au p: +61 (0)3 9345 2628 f: +61 (0)3 9347 0852 ------------------------------ ______________________________________________________________________ The information in this email is confidential and intended solely for the addressee. You must not disclose, forward, print or use it without the permission of the sender.
ADD REPLY
0
Entering edit mode
Hello Mark, Yes, you are correct. This is what happens when I am running couple DGE analysis at a time. Thank you very much for pointing out the typo. I will make sure that I give the output of the traceback() and sessionInfo(), in future. Thanks, Sridhara On Thu, Mar 3, 2011 at 9:57 PM, Mark Robinson <mrobinson@wehi.edu.au> wrote: > > Maybe you've made a typo? How about trying: > > de.tagwise06 <- exactTest(dt06, common.disp = FALSE) > > ... since the 'd06' object doesn't have the tagwise dispersions. > > Also, when you report errors, it's handy to also give the output of > traceback() and sessionInfo(). No need in this case, of course. > > Cheers, > Mark > > > On 2011-03-04, at 1:43 PM, Sridhara Gupta Kunjeti wrote: > > > Hello Davis, > > I did run estimateCommonDisp() and then estimageTagwiseDisp(). AND also > did the following codes: > > > > > dt06 <- estimateTagwiseDisp(d06, prior.n = 10) > > > names(dt06) > > > head(dt06$tagwise.dispersion) > > [1] 0.6054731 0.5433415 0.5083185 0.6054731 0.5553801 0.4640211 > > > summary(dt06$tagwise.dispersion) > > Min. 1st Qu. Median Mean 3rd Qu. Max. > > 0.4122 0.4223 0.4428 0.4613 0.4748 1.1390 > > > d06$common.dispersion > > [1] 0.4588705 > > > prior.n06 <- estimateSmoothing(d06) > > > prior.n06 > > [1] 5.131239e-05 > > > > When I tried to run exactTest, I am getting the following error message: > > > de.tagwise06 <- exactTest(d06, common.disp = FALSE) > > Comparison of groups: PPLB6dpi - PhyP18 > > Error in q2qnbinom(object$counts, input.mean = input.mean, output.mean = > output.mean, : > > dims [product 49700] do not match the length of object [0] > > > > I am curious what does it mean by "do not match the length of object[0]"? > > How this error can be fixed? > > > > Many thanks! > > Sridhara > > > > > > > > On Thu, Mar 3, 2011 at 9:26 PM, Sridhara Gupta Kunjeti < > sridhara@udel.edu> wrote: > > Hello Davis and Mark, > > Thank you very much for your response! > > I will run first common dispersion and then tagwise dispersion. > > > > Many thanks! > > Sridhara > > > > > > On Thu, Mar 3, 2011 at 9:20 PM, Mark Robinson <mrobinson@wehi.edu.au> > wrote: > > Hi Sridhara. > > > > You do need to run estimateCommonDisp() before estimateTagwiseDisp(). > We've modified the code now to detect whether it has been run and if not, > invisibly call it. > > > > Mark > > > > On 2011-03-04, at 1:03 PM, Sridhara Gupta Kunjeti wrote: > > > > > Hi, > > > I am using edgeR for DGE analysis and I have two samples with two > > > replication. > > > > > > I was successful in passing through the following codes > > >> setwd("C:/Users/SRIDHARA/Documents/Sequence analysis/02-Pphaseoli") > > >> targets <- read.delim(file = "targets.txt", stringsAsFactors = FALSE) > > >> targets <- read.delim(file = "targetsF0P6.txt", stringsAsFactors = > FALSE) > > >> targets > > >> d <- readDGE(targets, header = FALSE) > > >> d > > > > > > and then when I used TagWisedispersion, I get the following error > message > > >> d <- estimateTagwiseDisp(d, prior.n = 10) > > > Error in t.default(object$counts) : argument is not a matrix > > > > > > I was not sure, if I need to do > > >> d <- estimateCommonDisp(d) > > > AND then > > >> d <- estimateTagwiseDisp(d, prior.n = 10) > > > if I do this way, I do not get any error message. BUT I think, > TagwiseDisp > > > should work without calculating CommonDisp. > > > Any suggestions will be highly appreciated. > > > > > > Thanks, > > > Sridhara > > > > > > -- > > > Sridhara G Kunjeti > > > PhD Candidate > > > University of Delaware > > > Department of Plant and Soil Science > > > email- sridhara@udel.edu > > > Ph: 832-566-0011 > > > > > > [[alternative HTML version deleted]] > > > > > > _______________________________________________ > > > Bioconductor mailing list > > > Bioconductor@r-project.org > > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > > > > ------------------------------ > > Mark Robinson, PhD (Melb) > > Epigenetics Laboratory, Garvan > > Bioinformatics Division, WEHI > > e: mrobinson@wehi.edu.au > > e: m.robinson@garvan.org.au > > p: +61 (0)3 9345 2628 > > f: +61 (0)3 9347 0852 > > ------------------------------ > > > > > > ______________________________________________________________________ > > The information in this email is confidential and intended solely for the > addressee. > > You must not disclose, forward, print or use it without the permission of > the sender. > > ______________________________________________________________________ > > > > > > > > -- > > Sridhara G Kunjeti > > PhD Candidate > > University of Delaware > > Department of Plant and Soil Science > > email- sridhara@udel.edu > > Ph: 832-566-0011 > > > > > > > > -- > > Sridhara G Kunjeti > > PhD Candidate > > University of Delaware > > Department of Plant and Soil Science > > email- sridhara@udel.edu > > Ph: 832-566-0011 > > ------------------------------ > Mark Robinson, PhD (Melb) > Epigenetics Laboratory, Garvan > Bioinformatics Division, WEHI > e: mrobinson@wehi.edu.au > e: m.robinson@garvan.org.au > p: +61 (0)3 9345 2628 > f: +61 (0)3 9347 0852 > ------------------------------ > > > ______________________________________________________________________ > The information in this email is confidential and inte...{{dropped:20}}
ADD REPLY

Login before adding your answer.

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