Error uploading deseq2
1
0
Entering edit mode
@margaritabogorad-23345
Last seen 4.0 years ago

Hello,

Since yesterday I am facing an error uploading deseq2 package that has been installed for a long time and worked perfectly fine until yesterday. the error is

Error: package or namespace load failed for ‘DESeq2’:
 objects ‘rowSums’, ‘colSums’, ‘rowMeans’, ‘colMeans’ are not exported by 'namespace:S4Vectors'

I have restarted the R session, removed and installed again S4Vectors, IRanges, newest version of BiocGenerics but nothing helped. Do you know why all of the student I am facing this error?

Thank you in advance!

Rita

sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] viridis_0.5.1               viridisLite_0.3.0           tidyr_1.0.2                
 [4] dendextend_1.13.4           ggplot2_3.3.0               vegan_2.5-6                
 [7] lattice_0.20-41             permute_0.9-5               phyloseq_1.28.0            
[10] SummarizedExperiment_1.14.1 DelayedArray_0.10.0         BiocParallel_1.18.1        
[13] matrixStats_0.56.0          Biobase_2.46.0              GenomicRanges_1.36.1       
[16] GenomeInfoDb_1.20.0         IRanges_2.18.3              S4Vectors_0.22.1           
[19] BiocGenerics_0.32.0        

loaded via a namespace (and not attached):
 [1] nlme_3.1-147           bitops_1.0-6           RColorBrewer_1.1-2     tools_3.6.3           
 [5] backports_1.1.6        R6_2.4.1               rpart_4.1-15           Hmisc_4.4-0           
 [9] mgcv_1.8-31            colorspace_1.4-1       ade4_1.7-15            nnet_7.3-13           
[13] withr_2.1.2            tidyselect_1.0.0       gridExtra_2.3          compiler_3.6.3        
[17] cli_2.0.2              htmlTable_1.13.3       scales_1.1.0           checkmate_2.0.0       
[21] stringr_1.4.0          digest_0.6.25          foreign_0.8-76         XVector_0.26.0        
[25] base64enc_0.1-3        jpeg_0.1-8.1           pkgconfig_2.0.3        htmltools_0.4.0       
[29] htmlwidgets_1.5.1      rlang_0.4.5            rstudioapi_0.11        jsonlite_1.6.1        
[33] acepack_1.4.1          dplyr_0.8.5            RCurl_1.98-1.1         magrittr_1.5          
[37] GenomeInfoDbData_1.2.1 Formula_1.2-3          biomformat_1.14.0      Matrix_1.2-18         
[41] Rcpp_1.0.4.6           munsell_0.5.0          Rhdf5lib_1.8.0         fansi_0.4.1           
[45] ape_5.3                lifecycle_0.2.0        stringi_1.4.6          yaml_2.2.1            
[49] MASS_7.3-51.5          zlibbioc_1.32.0        rhdf5_2.30.1           plyr_1.8.6            
[53] grid_3.6.3             crayon_1.3.4           Biostrings_2.54.0      splines_3.6.3         
[57] multtest_2.42.0        knitr_1.28             pillar_1.4.3           igraph_1.2.5          
[61] reshape2_1.4.4         codetools_0.2-16       glue_1.4.0             latticeExtra_0.6-29   
[65] data.table_1.12.8      BiocManager_1.30.10    png_0.1-7              vctrs_0.2.4           
[69] foreach_1.5.0          gtable_0.3.0           purrr_0.3.3            assertthat_0.2.1      
[73] xfun_0.13              survival_3.1-12        tibble_3.0.0           iterators_1.0.12      
[77] cluster_2.1.0          ellipsis_0.3.0
deseq2 S4Vectors • 1.6k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 27 minutes ago
United States

Can you check:

BiocManager::valid()
ADD COMMENT
0
Entering edit mode

Thank you for your reply,

0 packages out-of-date; 2 packages too new

Those packages are Biostrings and XVector. Creating a valid installation for those two fails, again because of the S4Vectors

 BiocManager::install(c(
    "Biostrings", "XVector"
  ), update = TRUE, ask = FALSE)

Error: package or namespace load failed for ‘S4Vectors’:
 Function found when exporting methods from the namespace ‘S4Vectors’ which is not S4 generic: ‘%in%’
Error: package ‘S4Vectors’ could not be loaded
Execution halted
ADD REPLY
0
Entering edit mode

I'm not sure what the next step is. Do you know how you ended up with "too new" versions of these packages? Were you installing from .tar.gz packages downloaded from website?

ADD REPLY
0
Entering edit mode

Can you please try again in a 'vanilla' R session with no packages loaded, just

BiocManager::install("S4Vectors")

Like Michael I don't really have a good explanation for this.

ADD REPLY
0
Entering edit mode

installing S4Vectors in vanilla R helped to successfully load DESeq2, thank you for this suggestion.

But now I get an error with DESeq2 function (with the same input data) that was running well before yesterday.

DESeqDataSetFromMatrix(count_data, colData = data1_Prok, design = ~sample_type)

Error in validObject(.Object) : 
  invalid class “PartitioningByEnd” object: superclass "vector_OR_Vector" not defined in the environment of the object's class

The problem seems to be coming from IRanges package that by coincidence (or not) was updated yesterday. https://bioconductor.org/packages/release/bioc/manuals/IRanges/man/IRanges.pdf

ADD REPLY
1
Entering edit mode

What do you have for valid()?

ADD REPLY
0
Entering edit mode

do you mean BiocManager::valid() ? if so, then I still have 2 too new packages there ( "Biostrings", "XVector").

I did not install them from .tar.gz files and definitely did not get them recently (it was Easter holiday afterall..:)) everything was running just fine.

ADD REPLY
0
Entering edit mode

Again in a vanilla R session, remove the previous installations, repeating the following command until R says that there are no packages to remove

remove.packages(c("Biostrings", "XVector"))

Quit R, start again in a vanilla session, and re-install

BiocManager::install(c("Biostrings", "XVector"))

Hopefully BiocManager::valid() is then happy? It's worth figuring out how you got the 'too new' packages installed. Maybe you have two different versions of R that share the same .libPaths()?

ADD REPLY
0
Entering edit mode

Hmm, I guess I can't help much until you have an installation that passes valid() as it will likely lead to mis-matching code across versions of Bioc.

We take great care to make sure that all packages work within a release, so errors generated with versions of packages across releases are not really a developer concern (although we do want to make sure you can get to a correct installation of Bioconductor).

ADD REPLY
0
Entering edit mode

I have followed the instructions in Martin's reply and now BiocManager::valid() seems to be happy, outputting just TRUE. I have cleared the environment, restarted the session, successfully loaded all the packages but the same error under DESeqDataSetFromMatrix the function appears.....

Error in validObject(.Object) : 
  invalid class “PartitioningByEnd” object: superclass "vector_OR_Vector" not defined in the environment of the object's class

sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] Biostrings_2.52.0           XVector_0.24.0              reshape_0.8.8              
 [4] viridis_0.5.1               viridisLite_0.3.0           tidyr_1.0.2                
 [7] dendextend_1.13.4           ggplot2_3.3.0               DESeq2_1.24.0              
[10] SummarizedExperiment_1.14.1 DelayedArray_0.10.0         BiocParallel_1.18.1        
[13] matrixStats_0.56.0          Biobase_2.44.0              GenomicRanges_1.36.1       
[16] GenomeInfoDb_1.20.0         IRanges_2.18.3              S4Vectors_0.22.1           
[19] BiocGenerics_0.30.0         vegan_2.5-6                 lattice_0.20-41            
[22] permute_0.9-5               phyloseq_1.28.0            

loaded via a namespace (and not attached):
 [1] nlme_3.1-147           bitops_1.0-6           bit64_0.9-7            RColorBrewer_1.1-2    
 [5] tools_3.6.3            backports_1.1.6        R6_2.4.1               rpart_4.1-15          
 [9] Hmisc_4.4-0            DBI_1.1.0              mgcv_1.8-31            colorspace_1.4-1      
[13] ade4_1.7-15            nnet_7.3-13            withr_2.1.2            tidyselect_1.0.0      
[17] gridExtra_2.3          bit_1.1-15.2           compiler_3.6.3         cli_2.0.2             
[21] htmlTable_1.13.3       scales_1.1.0           checkmate_2.0.0        genefilter_1.66.0     
[25] stringr_1.4.0          digest_0.6.25          foreign_0.8-76         base64enc_0.1-3       
[29] jpeg_0.1-8.1           pkgconfig_2.0.3        htmltools_0.4.0        htmlwidgets_1.5.1     
[33] rlang_0.4.5            rstudioapi_0.11        RSQLite_2.2.0          jsonlite_1.6.1        
[37] acepack_1.4.1          dplyr_0.8.5            RCurl_1.98-1.1         magrittr_1.5          
[41] GenomeInfoDbData_1.2.1 Formula_1.2-3          biomformat_1.12.0      Matrix_1.2-18         
[45] Rcpp_1.0.4.6           munsell_0.5.0          Rhdf5lib_1.6.3         fansi_0.4.1           
[49] ape_5.3                lifecycle_0.2.0        stringi_1.4.6          yaml_2.2.1            
[53] MASS_7.3-51.5          zlibbioc_1.30.0        rhdf5_2.28.1           plyr_1.8.6            
[57] blob_1.2.1             grid_3.6.3             crayon_1.3.4           splines_3.6.3         
[61] multtest_2.40.0        annotate_1.62.0        locfit_1.5-9.4         knitr_1.28            
[65] pillar_1.4.3           igraph_1.2.5           geneplotter_1.62.0     reshape2_1.4.4        
[69] codetools_0.2-16       XML_3.99-0.3           glue_1.4.0             latticeExtra_0.6-29   
[73] BiocManager_1.30.10    data.table_1.12.8      png_0.1-7              vctrs_0.2.4           
[77] foreach_1.5.0          gtable_0.3.0           purrr_0.3.3            assertthat_0.2.1      
[81] xfun_0.13              xtable_1.8-4           survival_3.1-12        tibble_3.0.0          
[85] iterators_1.0.12       memoise_1.1.0          AnnotationDbi_1.46.1   cluster_2.1.0         
[89] ellipsis_0.3.0
ADD REPLY
0
Entering edit mode

I have managed to solve this issue - repeatedly installing and uninstalling all the packages involving vectors in R --vanilla mode helped to get DESeq2 functionalities back! I see that a similar issue previously occurred to another person as well so putting it here in case someone else gets stuck one day. https://support.bioconductor.org/p/115848/

Thank you very much, Michael and Martin, for all the help!

ADD REPLY

Login before adding your answer.

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