[BioC] edgeR: Problem with subsetting a DGEList in latest package version

Katja Hebestreit katjah at stanford.edu
Wed Aug 13 23:37:02 CEST 2014


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



More information about the Bioconductor mailing list