Bug: estimateSizeFactors in DESeq2 doesn't work with a single normalization control
1
2
Entering edit mode
Johannes Rainer ★ 2.1k
@johannes-rainer-6987
Last seen 7 weeks ago
Italy

dear all!

I recently experienced that it is not possible to normalize the counts of a miRNA-seq experiment using estimateSizeFactors against a single normalization control. Below is the code and the error.

> NORM <- "hsa-miR-30a-5p"
> idx <- which( rownames( Counts.deseq )==NORM )
> Counts.deseq.cnorm <- estimateSizeFactors( Counts.deseq, controlGenes=idx )
Error in apply(counts[controlGenes, ], 2, function(cnts) { :
  dim(X) must have a positive length

I suggest to add a drop=FALSE to avoid that problem (i.e.  counts[ controlGenes, , drop=FALSE ] ).

cheers, jo

 

my R-version etc:

> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-apple-darwin14.0.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets
[8] methods   base     

other attached packages:
[1] DESeq2_1.6.2              RcppArmadillo_0.4.550.1.0
[3] Rcpp_0.11.3               GenomicRanges_1.18.4     
[5] GenomeInfoDb_1.2.4        IRanges_2.0.1            
[7] S4Vectors_0.4.0           BiocGenerics_0.12.1      

loaded via a namespace (and not attached):
 [1] acepack_1.3-3.3      annotate_1.44.0      AnnotationDbi_1.28.1
 [4] base64enc_0.1-2      BatchJobs_1.5        BBmisc_1.8          
 [7] Biobase_2.26.0       BiocParallel_1.0.0   brew_1.0-6          
[10] checkmate_1.5.1      cluster_1.15.3       codetools_0.2-9     
[13] colorspace_1.2-4     DBI_0.3.1            digest_0.6.8        
[16] fail_1.2             foreach_1.4.2        foreign_0.8-62      
[19] Formula_1.1-2        genefilter_1.48.1    geneplotter_1.44.0  
[22] ggplot2_1.0.0        grid_3.1.2           gtable_0.1.2        
[25] Hmisc_3.14-6         iterators_1.0.7      lattice_0.20-29     
[28] latticeExtra_0.6-26  locfit_1.5-9.1       MASS_7.3-37         
[31] munsell_0.4.2        nnet_7.3-8           plyr_1.8.1          
[34] proto_0.3-10         RColorBrewer_1.1-2   reshape2_1.4.1      
[37] rpart_4.1-8          RSQLite_1.0.0        scales_0.2.4        
[40] sendmailR_1.2-1      splines_3.1.2        stringr_0.6.2       
[43] survival_2.37-7      tools_3.1.2          XML_3.98-1.1        
[46] xtable_1.7-4         XVector_0.6.0       

 

 

deseq2 bug • 1.5k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 1 hour ago
United States

hi Jo,

Thanks for the note. I will fix this in devel.

A workaround is to use estimateSizeFactorForMatrix() with a one row matrix and then sizeFactors(dds)<-

ADD COMMENT
0
Entering edit mode

thanks Micheal!

ADD REPLY

Login before adding your answer.

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