Issue with scp transfer of DESeq2 objects
Entering edit mode
Last seen 18 months ago
United Kingdom

Hi all,

I am running DESeq2 on a Unix cluster and exporting the result onto my laptop using scp transfer for further analyses. Using R, I save the result of DESeq2 as an R object (Robj):

   dds <- DESeq(dds, sfType = "poscounts", useT = TRUE, minmu = 1e-6)
    save(dds, file = "/cluster/path/to/file/dds.Robj")
class: DESeqDataSet 
dim: 3807 79 
metadata(1): version
assays(7): counts weights ... replaceCounts replaceCooks
rownames(3807): 14-3-3epsilon 14-3-3zeta ... zip zld
rowData names(32): baseMean baseVar ... tDegreesFreedom replace
colnames(79): dep06_rep1_GCCATGGCACAGAGCA dep06_rep1_GCAGCTGGTCAATGGG ...
colData names(54): orig.ident nCount_RNA ... sizeFactor replaceable

So far so good. Now I use scp to transfer the file to my computer:

scp name@domain.extension:/cluster/path/to/file/dds.Robj /local/path/to/file/.

And load it into R locally:


Now when I open the file in R, I would expect to see a summary of the dds object, as above, but instead I get the following error:


class: DESeqDataSet 
metadata(1): version
Error in getClass(element.type) : “SimpleAssays” is not a defined class
Error during wrapup: 'length(x) = 14 > 1' in coercion to 'logical(1)'

If I run DESeq2 on my laptop there is no problem, and if I copy the file back onto the server there is no problem either...

Does anyone have an idea of what is going on and how I could fix this? Many thanks, Vinnie

Session Info (Cluster):

R version 3.6.1 (2019-07-05)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: Scientific Linux release 6.10 (Carbon)

Matrix products: default
BLAS/LAPACK: /ifs/home/vincent/.conda/envs/zinb/lib/R/lib/

 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            

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

other attached packages:
 [1] ashr_2.2-39                 lmtest_0.9-37              
 [3] zoo_1.8-6                   apeglm_1.8.0               
 [5] zinbwave_1.8.0              gsl_2.1-6                  
 [7] MAST_1.12.0                 SingleCellExperiment_1.8.0 
 [9] scales_1.0.0                DECENT_1.1.0               
[11] edgeR_3.28.0                limma_3.42.0               
[13] DESeq2_1.26.0               SummarizedExperiment_1.16.0
[15] DelayedArray_0.12.0         BiocParallel_1.20.0        
[17] matrixStats_0.55.0          Biobase_2.46.0             
[19] GenomicRanges_1.38.0        GenomeInfoDb_1.22.0        
[21] IRanges_2.20.0              S4Vectors_0.24.0           
[23] BiocGenerics_0.32.0         lattice_0.20-38            
[25] data.table_1.12.6           RColorBrewer_1.1-2         
[27] dplyr_0.8.3                 Seurat_3.1.1               
[29] cowplot_1.0.0               Matrix_1.2-17              
[31] ggplot2_3.2.1              

loaded via a namespace (and not attached):
  [1] backports_1.1.5        Hmisc_4.2-0            VGAM_1.1-1            
  [4] plyr_1.8.4             igraph_1.2.4.1         lazyeval_0.2.2        
  [7] splines_3.6.1          listenv_0.7.0          digest_0.6.22         
 [10] foreach_1.4.7          htmltools_0.4.0        SQUAREM_2017.10-1     
 [13] gdata_2.18.0           magrittr_1.5           checkmate_1.9.4       
 [16] memoise_1.1.0          doParallel_1.0.15      cluster_2.1.0         
 [19] ROCR_1.0-7             globals_0.12.4         annotate_1.64.0       
 [22] RcppParallel_4.4.4     R.utils_2.9.0          colorspace_1.4-1      
 [25] blob_1.2.0             ggrepel_0.8.1          xfun_0.10             
 [28] crayon_1.3.4           RCurl_1.95-4.12        jsonlite_1.6          
 [31] genefilter_1.68.0      zeallot_0.1.0          iterators_1.0.12      
 [34] survival_3.1-6         ape_5.3                glue_1.3.1            
 [37] gtable_0.3.0           zlibbioc_1.32.0        XVector_0.26.0        
 [40] leiden_0.3.1           future.apply_1.3.0     pscl_1.5.2            
 [43] abind_1.4-5            DBI_1.0.0              bibtex_0.4.2          
 [46] Rcpp_1.0.3             metap_1.1              emdbook_1.3.11        
 [49] viridisLite_0.3.0      xtable_1.8-4           htmlTable_1.13.2      
 [52] reticulate_1.13        foreign_0.8-72         bit_1.1-14            
 [55] rsvd_1.0.2             SDMTools_1.1-221.1     Formula_1.2-3         
 [58] tsne_0.1-3             truncnorm_1.0-8        htmlwidgets_1.5.1     
 [61] httr_1.4.1             gplots_3.0.1.1         acepack_1.4.1         
 [64] ica_1.0-2              pkgconfig_2.0.3        XML_3.98-1.20         
 [67] R.methodsS3_1.7.1      nnet_7.3-12            uwot_0.1.4            
 [70] locfit_1.5-9.1         softImpute_1.4         tidyselect_0.2.5      
 [73] rlang_0.4.1            reshape2_1.4.3         AnnotationDbi_1.48.0  
 [76] munsell_0.5.0          tools_3.6.1            RSQLite_2.1.2         
 [79] ggridges_0.5.1         stringr_1.4.0          npsurv_0.4-0          
 [82] knitr_1.25             bit64_0.9-7            fitdistrplus_1.0-14   
 [85] caTools_1.17.1.2       purrr_0.3.3            RANN_2.6.1            
 [88] pbapply_1.4-2          future_1.14.0          nlme_3.1-141          
 [91] R.oo_1.23.0            compiler_3.6.1         rstudioapi_0.10       
 [94] plotly_4.9.0           png_0.1-7              lsei_1.2-0            
 [97] statmod_1.4.32         tibble_2.1.3           geneplotter_1.64.0    
[100] stringi_1.4.3          ZIM_1.1.0              vctrs_0.2.0           
[103] pillar_1.4.2           lifecycle_0.1.0        Rdpack_0.11-0         
[106] RcppAnnoy_0.0.13       bitops_1.0-6           irlba_2.3.3           
[109] gbRd_0.4-11            R6_2.4.0               latticeExtra_0.6-28   
[112] KernSmooth_2.23-16     gridExtra_2.3          codetools_0.2-16      
[115] MASS_7.3-51.4          gtools_3.8.1           assertthat_0.2.1      
[118] withr_2.1.2            sctransform_0.2.0      GenomeInfoDbData_1.2.2
[121] grid_3.6.1             rpart_4.1-15           coda_0.19-3           
[124] tidyr_1.0.0            Rtsne_0.15             mixsqp_0.2-2          
[127] bbmle_1.0.20           numDeriv_2016.8-1.1    base64enc_0.1-3

Session Info (Local):

R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.2

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

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

[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

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

other attached packages:
 [1] yaml_2.2.0                  R.utils_2.9.0               R.oo_1.23.0                
 [4] R.methodsS3_1.7.1           bit64_0.9-7                 bit_1.1-14                 
 [7] ashr_2.2-39                 lmtest_0.9-37               zoo_1.8-6                  
[10] apeglm_1.6.0                zinbwave_1.6.0              gsl_1.9-10.3               
[13] MAST_1.10.0                 SingleCellExperiment_1.6.0  scales_1.0.0               
[16] DECENT_1.1.0                edgeR_3.26.8                limma_3.40.6               
[19] DESeq2_1.24.0               SummarizedExperiment_1.14.1 DelayedArray_0.10.0        
[22] BiocParallel_1.18.1         matrixStats_0.55.0          Biobase_2.44.0             
[25] GenomicRanges_1.36.1        GenomeInfoDb_1.20.0         IRanges_2.18.3             
[28] S4Vectors_0.22.1            BiocGenerics_0.30.0         DoubletFinder_2.0.2        
[31] clustree_0.4.1              ggraph_2.0.0                lattice_0.20-38            
[34] heatmap3_1.1.6              data.table_1.12.6           RColorBrewer_1.1-2         
[37] randomcoloR_1.1.0           dplyr_0.8.3                 Seurat_3.1.1               
[40] cowplot_1.0.0               Matrix_1.2-17               ggplot2_3.2.1              

loaded via a namespace (and not attached):
  [1] reticulate_1.13        tidyselect_0.2.5       lme4_1.1-21            RSQLite_2.1.2         
  [5] AnnotationDbi_1.46.1   htmlwidgets_1.5.1      grid_3.6.1             Rtsne_0.15            
  [9] munsell_0.5.0          codetools_0.2-16       ica_1.0-2              statmod_1.4.32        
 [13] future_1.15.0          withr_2.1.2            colorspace_1.4-1       knitr_1.26            
 [17] pspline_1.0-18         rstudioapi_0.10        pscl_1.5.2             ROCR_1.0-7            
 [21] gbRd_0.4-11            listenv_0.7.0          labeling_0.3           Rdpack_0.11-0         
 [25] bbmle_1.0.20           GenomeInfoDbData_1.2.1 mixsqp_0.2-2           polyclip_1.10-0       
 [29] farver_2.0.1           coda_0.19-3            vctrs_0.2.0            xfun_0.11             
 [33] fastcluster_1.1.25     R6_2.4.1               doParallel_1.0.15      graphlayouts_0.5.0    
 [37] rsvd_1.0.2             VGAM_1.1-1             locfit_1.5-9.1         bitops_1.0-6          
 [41] assertthat_0.2.1       SDMTools_1.1-221.1     nnet_7.3-12            ZIM_1.1.0             
 [45] gtable_0.3.0           npsurv_0.4-0           globals_0.12.4         tidygraph_1.1.2       
 [49] rlang_0.4.1            zeallot_0.1.0          genefilter_1.66.0      splines_3.6.1         
 [53] lazyeval_0.2.2         acepack_1.4.1          checkmate_1.9.4        reshape2_1.4.3        
 [57] abind_1.4-5            backports_1.1.5        Hmisc_4.3-0            tools_3.6.1           
 [61] gplots_3.0.1.1         stabledist_0.7-1       ggridges_0.5.1         Rcpp_1.0.3            
 [65] plyr_1.8.4             base64enc_0.1-3        zlibbioc_1.30.0        purrr_0.3.3           
 [69] RCurl_1.95-4.12        rpart_4.1-15           pbapply_1.4-2          viridis_0.5.1         
 [73] ggrepel_0.8.1          cluster_2.1.0          magrittr_1.5           RANN_2.6.1            
 [77] truncnorm_1.0-8        SQUAREM_2017.10-1      mvtnorm_1.0-11         fitdistrplus_1.0-14   
 [81] lsei_1.2-0             xtable_1.8-4           XML_3.98-1.20          emdbook_1.3.11        
 [85] shape_1.4.4            gridExtra_2.3          compiler_3.6.1         tibble_2.1.3          
 [89] KernSmooth_2.23-16     V8_2.3                 crayon_1.3.4           minqa_1.2.4           
 [93] htmltools_0.4.0        pcaPP_1.9-73           Formula_1.2-3          tidyr_1.0.0           
 [97] geneplotter_1.62.0     RcppParallel_4.4.4     DBI_1.0.0              tweenr_1.0.1          
[101] MASS_7.3-51.4          boot_1.3-23            gdata_2.18.0           metap_1.1             
[105] igraph_1.2.4.1         pkgconfig_2.0.3        numDeriv_2016.8-1.1    foreign_0.8-72        
[109] plotly_4.9.1           foreach_1.4.7          annotate_1.62.0        blme_1.0-4            
[113] XVector_0.24.0         bibtex_0.4.2           stringr_1.4.0          digest_0.6.22         
[117] copula_0.999-19.1      sctransform_0.2.0      RcppAnnoy_0.0.14       tsne_0.1-3            
[121] ADGofTest_0.3          softImpute_1.4         leiden_0.3.1           htmlTable_1.13.2      
[125] uwot_0.1.4             curl_4.2               gtools_3.8.1           nloptr_1.2.1          
[129] lifecycle_0.1.0        nlme_3.1-142           jsonlite_1.6           viridisLite_0.3.0     
[133] pillar_1.4.2           httr_1.4.1             survival_3.1-7         glue_1.3.1            
[137] png_0.1-7              iterators_1.0.12       glmnet_3.0-1           ggforce_0.3.1         
[141] stringi_1.4.3          blob_1.2.0             latticeExtra_0.6-28    caTools_1.17.1.2      
[145] memoise_1.1.0          irlba_2.3.3            future.apply_1.3.0     ape_5.3
deseq2 scp Unix Single-Cell • 1.7k views
Entering edit mode
Last seen 2 days ago
United States

First thing would be if you can line up the two machines so they are on the same version.

DESeqDataSet is a sub-class of the SummarizedExperiment class. These are designed to port across versions, but this would be the first thing I'd check. Another option is to try (in the newer version of Bioconductor):

obj <- updateObject(obj)

FWIW, I haven't changed the structure of the DESeqDataSet in DESeq2 code in a long time, but the underlying class (SummarizedExperiment) does change sometimes.

Entering edit mode

It looks like your laptop is at an older version of Bioconductor than the cluster; confirm this with


It seems likely that you can update your laptop to a current version with (in a new R session, with no packages attached)

BiocManager::install(version = "3.10")
Entering edit mode

Yeah that works, thanks a lot!


Login before adding your answer.

Traffic: 728 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6