edgeR: Problem with subsetting a DGEList in latest package version
2
0
Entering edit mode
@katja-hebestreit-6495
Last seen 4.4 years ago
United States
Hello edgeR maintainers, I just ran into an error with code that is several weeks old. I cannot subset my DEGList object anymore. I created it from the HTseq output: > files <- list.files("Gene_counts", recursive = FALSE, pattern = "counts", full.names=TRUE) > rc <- readDGE(files, labels = labels) > dim(rc) [1] 23429 40 > out1 <- which(colnames(rc) == "PGE_old_E") > rc <- rc[,-out1] Error in `$<-.data.frame`(`*tmp*`, "group", value = integer(0)) : replacement has 0 rows, data has 39 Subsetting on genes works: > test <- rc[1,] But subsetting on samples does not: > test <- rc[,1] Error in `$<-.data.frame`(`*tmp*`, "group", value = integer(0)) : replacement has 0 rows, data has 1 The code worked a couple of weeks ago. I guess that there is a bug in the latest edgeR version that is causing this? Interestingly, I cannot reproduce the error using the example data in the DGEList manual: y <- matrix(rnbinom(10000,mu=5,size=2),ncol=4) d <- DGEList(counts=y, group=rep(1:2,each=2)) I would be grateful for any help! Cheers, Katja > sessionInfo() R version 3.1.0 (2014-04-10) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.iso885915 LC_NUMERIC=C [3] LC_TIME=en_US.iso885915 LC_COLLATE=en_US.iso885915 [5] LC_MONETARY=en_US.iso885915 LC_MESSAGES=en_US.iso885915 [7] LC_PAPER=en_US.iso885915 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] edgeR_3.6.7 limma_3.20.8 loaded via a namespace (and not attached): [1] compiler_3.1.0 tools_3.1.0
edgeR edgeR • 3.4k views
ADD COMMENT
1
Entering edit mode
Mark Robinson ▴ 880
@mark-robinson-4908
Last seen 6.1 years ago
Hi Katja, Apologies for the slow response. I can reproduce this, thanks for sharing. Gordon or I will commit a fix shortly. In the meantime, try: rc <- readDGE(files, labels = labels) rc <- DGEList(rc$counts) Then, subletting should work. Cheers, Mark On 13.08.2014, at 23:37, Katja Hebestreit <katjah at="" stanford.edu=""> wrote: > Hello edgeR maintainers, > > I just ran into an error with code that is several weeks old. I cannot subset my DEGList object anymore. I created it from the HTseq output: > > >> files <- list.files("Gene_counts", > recursive = FALSE, pattern = "counts", > full.names=TRUE) > >> rc <- readDGE(files, labels = labels) >> dim(rc) > [1] 23429 40 > >> out1 <- which(colnames(rc) == "PGE_old_E") >> rc <- rc[,-out1] > Error in `$<-.data.frame`(`*tmp*`, "group", value = integer(0)) : > replacement has 0 rows, data has 39 > > Subsetting on genes works: >> test <- rc[1,] > > But subsetting on samples does not: >> test <- rc[,1] > Error in `$<-.data.frame`(`*tmp*`, "group", value = integer(0)) : > replacement has 0 rows, data has 1 > > > The code worked a couple of weeks ago. I guess that there is a bug in the latest edgeR version that is causing this? Interestingly, I cannot reproduce the error using the example data in the DGEList manual: > > y <- matrix(rnbinom(10000,mu=5,size=2),ncol=4) > d <- DGEList(counts=y, group=rep(1:2,each=2)) > > > I would be grateful for any help! > > Cheers, > Katja > > >> sessionInfo() > R version 3.1.0 (2014-04-10) > Platform: x86_64-unknown-linux-gnu (64-bit) > > locale: > [1] LC_CTYPE=en_US.iso885915 LC_NUMERIC=C > [3] LC_TIME=en_US.iso885915 LC_COLLATE=en_US.iso885915 > [5] LC_MONETARY=en_US.iso885915 LC_MESSAGES=en_US.iso885915 > [7] LC_PAPER=en_US.iso885915 LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] edgeR_3.6.7 limma_3.20.8 > > loaded via a namespace (and not attached): > [1] compiler_3.1.0 tools_3.1.0 >
ADD COMMENT
0
Entering edit mode
Hi Mark, Awesome! Thanks so much!! - Katja ----- Original Message ----- From: "Mark Robinson" <mark.robinson@imls.uzh.ch> To: "Katja Hebestreit" <katjah at="" stanford.edu=""> Cc: bioconductor at r-project.org Sent: Thursday, August 14, 2014 11:00:55 AM Subject: Re: edgeR: Problem with subsetting a DGEList in latest package version Hi Katja, Apologies for the slow response. I can reproduce this, thanks for sharing. Gordon or I will commit a fix shortly. In the meantime, try: rc <- readDGE(files, labels = labels) rc <- DGEList(rc$counts) Then, subletting should work. Cheers, Mark On 13.08.2014, at 23:37, Katja Hebestreit <katjah at="" stanford.edu=""> wrote: > Hello edgeR maintainers, > > I just ran into an error with code that is several weeks old. I cannot subset my DEGList object anymore. I created it from the HTseq output: > > >> files <- list.files("Gene_counts", > recursive = FALSE, pattern = "counts", > full.names=TRUE) > >> rc <- readDGE(files, labels = labels) >> dim(rc) > [1] 23429 40 > >> out1 <- which(colnames(rc) == "PGE_old_E") >> rc <- rc[,-out1] > Error in `$<-.data.frame`(`*tmp*`, "group", value = integer(0)) : > replacement has 0 rows, data has 39 > > Subsetting on genes works: >> test <- rc[1,] > > But subsetting on samples does not: >> test <- rc[,1] > Error in `$<-.data.frame`(`*tmp*`, "group", value = integer(0)) : > replacement has 0 rows, data has 1 > > > The code worked a couple of weeks ago. I guess that there is a bug in the latest edgeR version that is causing this? Interestingly, I cannot reproduce the error using the example data in the DGEList manual: > > y <- matrix(rnbinom(10000,mu=5,size=2),ncol=4) > d <- DGEList(counts=y, group=rep(1:2,each=2)) > > > I would be grateful for any help! > > Cheers, > Katja > > >> sessionInfo() > R version 3.1.0 (2014-04-10) > Platform: x86_64-unknown-linux-gnu (64-bit) > > locale: > [1] LC_CTYPE=en_US.iso885915 LC_NUMERIC=C > [3] LC_TIME=en_US.iso885915 LC_COLLATE=en_US.iso885915 > [5] LC_MONETARY=en_US.iso885915 LC_MESSAGES=en_US.iso885915 > [7] LC_PAPER=en_US.iso885915 LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] edgeR_3.6.7 limma_3.20.8 > > loaded via a namespace (and not attached): > [1] compiler_3.1.0 tools_3.1.0 >
ADD REPLY
0
Entering edit mode
@steve-lianoglou-2771
Last seen 21 months ago
United States
Hi, On Wed, Aug 13, 2014 at 2:37 PM, Katja Hebestreit <katjah at="" stanford.edu=""> wrote: > Hello edgeR maintainers, > > I just ran into an error with code that is several weeks old. I cannot subset my DEGList object anymore. I created it from the HTseq output: > > >> files <- list.files("Gene_counts", > recursive = FALSE, pattern = "counts", > full.names=TRUE) > >> rc <- readDGE(files, labels = labels) >> dim(rc) > [1] 23429 40 > >> out1 <- which(colnames(rc) == "PGE_old_E") >> rc <- rc[,-out1] > Error in `$<-.data.frame`(`*tmp*`, "group", value = integer(0)) : > replacement has 0 rows, data has 39 Can please you show us the output of: R> lapply(rc, dim) Thanks, -steve -- Steve Lianoglou Computational Biologist Genentech
ADD COMMENT
0
Entering edit mode
On Wed, Aug 13, 2014 at 2:58 PM, Steve Lianoglou <lianoglou.steve at="" gene.com=""> wrote: > Hi, > > On Wed, Aug 13, 2014 at 2:37 PM, Katja Hebestreit <katjah at="" stanford.edu=""> wrote: >> Hello edgeR maintainers, >> >> I just ran into an error with code that is several weeks old. I cannot subset my DEGList object anymore. I created it from the HTseq output: >> >> >>> files <- list.files("Gene_counts", >> recursive = FALSE, pattern = "counts", >> full.names=TRUE) >> >>> rc <- readDGE(files, labels = labels) >>> dim(rc) >> [1] 23429 40 >> >>> out1 <- which(colnames(rc) == "PGE_old_E") >>> rc <- rc[,-out1] >> Error in `$<-.data.frame`(`*tmp*`, "group", value = integer(0)) : >> replacement has 0 rows, data has 39 > > Can please you show us the output of: > > R> lapply(rc, dim) as well as: R> length(out1) -- Steve Lianoglou Computational Biologist Genentech
ADD REPLY
0
Entering edit mode
Hi Steve, Here the output: > lapply(rc, dim) $samples [1] 39 6 $counts [1] 23429 39 > length(rc) [1] 913731 Thanks for helping!! Katja ----- Original Message ----- From: "Steve Lianoglou" <lianoglou.steve@gene.com> To: "Katja Hebestreit" <katjah at="" stanford.edu=""> Cc: "bioconductor at r-project.org list" <bioconductor at="" r-project.org=""> Sent: Wednesday, August 13, 2014 3:00:19 PM Subject: Re: [BioC] edgeR: Problem with subsetting a DGEList in latest package version On Wed, Aug 13, 2014 at 2:58 PM, Steve Lianoglou <lianoglou.steve at="" gene.com=""> wrote: > Hi, > > On Wed, Aug 13, 2014 at 2:37 PM, Katja Hebestreit <katjah at="" stanford.edu=""> wrote: >> Hello edgeR maintainers, >> >> I just ran into an error with code that is several weeks old. I cannot subset my DEGList object anymore. I created it from the HTseq output: >> >> >>> files <- list.files("Gene_counts", >> recursive = FALSE, pattern = "counts", >> full.names=TRUE) >> >>> rc <- readDGE(files, labels = labels) >>> dim(rc) >> [1] 23429 40 >> >>> out1 <- which(colnames(rc) == "PGE_old_E") >>> rc <- rc[,-out1] >> Error in `$<-.data.frame`(`*tmp*`, "group", value = integer(0)) : >> replacement has 0 rows, data has 39 > > Can please you show us the output of: > > R> lapply(rc, dim) as well as: R> length(out1) -- Steve Lianoglou Computational Biologist Genentech
ADD REPLY
0
Entering edit mode
Sorry, this is the right output: > lapply(rc, dim) $samples [1] 40 3 $counts [1] 23429 40 > length(rc) [1] 937160 -Katja ----- Original Message ----- From: "Katja Hebestreit" <katjah@stanford.edu> To: "Steve Lianoglou" <lianoglou.steve at="" gene.com=""> Cc: "bioconductor at r-project.org list" <bioconductor at="" r-project.org=""> Sent: Wednesday, August 13, 2014 6:10:59 PM Subject: Re: [BioC] edgeR: Problem with subsetting a DGEList in latest package version Hi Steve, Here the output: > lapply(rc, dim) $samples [1] 39 6 $counts [1] 23429 39 > length(rc) [1] 913731 Thanks for helping!! Katja ----- Original Message ----- From: "Steve Lianoglou" <lianoglou.steve@gene.com> To: "Katja Hebestreit" <katjah at="" stanford.edu=""> Cc: "bioconductor at r-project.org list" <bioconductor at="" r-project.org=""> Sent: Wednesday, August 13, 2014 3:00:19 PM Subject: Re: [BioC] edgeR: Problem with subsetting a DGEList in latest package version On Wed, Aug 13, 2014 at 2:58 PM, Steve Lianoglou <lianoglou.steve at="" gene.com=""> wrote: > Hi, > > On Wed, Aug 13, 2014 at 2:37 PM, Katja Hebestreit <katjah at="" stanford.edu=""> wrote: >> Hello edgeR maintainers, >> >> I just ran into an error with code that is several weeks old. I cannot subset my DEGList object anymore. I created it from the HTseq output: >> >> >>> files <- list.files("Gene_counts", >> recursive = FALSE, pattern = "counts", >> full.names=TRUE) >> >>> rc <- readDGE(files, labels = labels) >>> dim(rc) >> [1] 23429 40 >> >>> out1 <- which(colnames(rc) == "PGE_old_E") >>> rc <- rc[,-out1] >> Error in `$<-.data.frame`(`*tmp*`, "group", value = integer(0)) : >> replacement has 0 rows, data has 39 > > Can please you show us the output of: > > R> lapply(rc, dim) as well as: R> length(out1) -- Steve Lianoglou Computational Biologist Genentech _______________________________________________ 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
ADD REPLY
0
Entering edit mode
Hi Katja, Steve asked you for the length of the 'out1' object rathen then 'rc'; can you please share the output of length(out1) Cheers, Andrzej On Thu, Aug 14, 2014 at 3:13 AM, Katja Hebestreit <katjah at="" stanford.edu=""> wrote: > Sorry, this is the right output: > > > lapply(rc, dim) > $samples > [1] 40 3 > > $counts > [1] 23429 40 > >> length(rc) > [1] 937160 > > -Katja > > ----- Original Message ----- > From: "Katja Hebestreit" <katjah at="" stanford.edu=""> > To: "Steve Lianoglou" <lianoglou.steve at="" gene.com=""> > Cc: "bioconductor at r-project.org list" <bioconductor at="" r-project.org=""> > Sent: Wednesday, August 13, 2014 6:10:59 PM > Subject: Re: [BioC] edgeR: Problem with subsetting a DGEList in latest package version > > Hi Steve, > > Here the output: > > >> lapply(rc, dim) > $samples > [1] 39 6 > > $counts > [1] 23429 39 > >> length(rc) > [1] 913731 > > > Thanks for helping!! > Katja > > > ----- Original Message ----- > From: "Steve Lianoglou" <lianoglou.steve at="" gene.com=""> > To: "Katja Hebestreit" <katjah at="" stanford.edu=""> > Cc: "bioconductor at r-project.org list" <bioconductor at="" r-project.org=""> > Sent: Wednesday, August 13, 2014 3:00:19 PM > Subject: Re: [BioC] edgeR: Problem with subsetting a DGEList in latest package version > > On Wed, Aug 13, 2014 at 2:58 PM, Steve Lianoglou > <lianoglou.steve at="" gene.com=""> wrote: >> Hi, >> >> On Wed, Aug 13, 2014 at 2:37 PM, Katja Hebestreit <katjah at="" stanford.edu=""> wrote: >>> Hello edgeR maintainers, >>> >>> I just ran into an error with code that is several weeks old. I cannot subset my DEGList object anymore. I created it from the HTseq output: >>> >>> >>>> files <- list.files("Gene_counts", >>> recursive = FALSE, pattern = "counts", >>> full.names=TRUE) >>> >>>> rc <- readDGE(files, labels = labels) >>>> dim(rc) >>> [1] 23429 40 >>> >>>> out1 <- which(colnames(rc) == "PGE_old_E") >>>> rc <- rc[,-out1] >>> Error in `$<-.data.frame`(`*tmp*`, "group", value = integer(0)) : >>> replacement has 0 rows, data has 39 >> >> Can please you show us the output of: >> >> R> lapply(rc, dim) > > as well as: > > R> length(out1) > > -- > Steve Lianoglou > Computational Biologist > Genentech > > _______________________________________________ > 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 > > _______________________________________________ > 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
ADD REPLY
0
Entering edit mode
Hi Andrzej, > length(out1) [1] 1 Also, this does not work: > test <- rc[,1] Error in `$<-.data.frame`(`*tmp*`, "group", value = integer(0)) : replacement has 0 rows, data has 1 Thanks for helping! Katja ----- Original Message ----- From: "Andrzej Ole?" <andrzej.oles@gmail.com> To: "Katja Hebestreit" <katjah at="" stanford.edu=""> Cc: "Steve Lianoglou" <lianoglou.steve at="" gene.com="">, "bioconductor at r-project.org list" <bioconductor at="" r-project.org=""> Sent: Thursday, August 14, 2014 1:50:20 AM Subject: Re: [BioC] edgeR: Problem with subsetting a DGEList in latest package version Hi Katja, Steve asked you for the length of the 'out1' object rathen then 'rc'; can you please share the output of length(out1) Cheers, Andrzej On Thu, Aug 14, 2014 at 3:13 AM, Katja Hebestreit <katjah at="" stanford.edu=""> wrote: > Sorry, this is the right output: > > > lapply(rc, dim) > $samples > [1] 40 3 > > $counts > [1] 23429 40 > >> length(rc) > [1] 937160 > > -Katja > > ----- Original Message ----- > From: "Katja Hebestreit" <katjah at="" stanford.edu=""> > To: "Steve Lianoglou" <lianoglou.steve at="" gene.com=""> > Cc: "bioconductor at r-project.org list" <bioconductor at="" r-project.org=""> > Sent: Wednesday, August 13, 2014 6:10:59 PM > Subject: Re: [BioC] edgeR: Problem with subsetting a DGEList in latest package version > > Hi Steve, > > Here the output: > > >> lapply(rc, dim) > $samples > [1] 39 6 > > $counts > [1] 23429 39 > >> length(rc) > [1] 913731 > > > Thanks for helping!! > Katja > > > ----- Original Message ----- > From: "Steve Lianoglou" <lianoglou.steve at="" gene.com=""> > To: "Katja Hebestreit" <katjah at="" stanford.edu=""> > Cc: "bioconductor at r-project.org list" <bioconductor at="" r-project.org=""> > Sent: Wednesday, August 13, 2014 3:00:19 PM > Subject: Re: [BioC] edgeR: Problem with subsetting a DGEList in latest package version > > On Wed, Aug 13, 2014 at 2:58 PM, Steve Lianoglou > <lianoglou.steve at="" gene.com=""> wrote: >> Hi, >> >> On Wed, Aug 13, 2014 at 2:37 PM, Katja Hebestreit <katjah at="" stanford.edu=""> wrote: >>> Hello edgeR maintainers, >>> >>> I just ran into an error with code that is several weeks old. I cannot subset my DEGList object anymore. I created it from the HTseq output: >>> >>> >>>> files <- list.files("Gene_counts", >>> recursive = FALSE, pattern = "counts", >>> full.names=TRUE) >>> >>>> rc <- readDGE(files, labels = labels) >>>> dim(rc) >>> [1] 23429 40 >>> >>>> out1 <- which(colnames(rc) == "PGE_old_E") >>>> rc <- rc[,-out1] >>> Error in `$<-.data.frame`(`*tmp*`, "group", value = integer(0)) : >>> replacement has 0 rows, data has 39 >> >> Can please you show us the output of: >> >> R> lapply(rc, dim) > > as well as: > > R> length(out1) > > -- > Steve Lianoglou > Computational Biologist > Genentech > > _______________________________________________ > 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 > > _______________________________________________ > 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
ADD REPLY

Login before adding your answer.

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