gagneurlab / FRASER

FRASER - Find RAre Splicing Events in RNA-seq
MIT License
36 stars 20 forks source link

loadFraserDataSet directory ignored #11

Closed bw2 closed 4 years ago

bw2 commented 4 years ago

Hi, thanks for making this great library. I'm seeing an issue with the loadFraserDataSet function. When I run

setwd("/tmp/fraser/")
saveFraserDataSet(fds)

I can later do

fds <- loadFraserDataSet(file="/tmp/fraser/savedObjects/Data_Analysis/fds-object.RDS")

to restore the dataset. But if I rename /tmp/fraser to /tmp/fraser2 and then run

fds <- loadFraserDataSet(file="/tmp/fraser2/savedObjects/Data_Analysis/fds-object.RDS")

I get this error:

> fds <- loadFraserDataSet(file="/tmp/fraser2/savedObjects/Data_Analysis/fds-object.RDS")
Error in value[[3L]](cond) : 
  'assay(<FraserDataSet>, i="character", ...)' invalid subscript 'i'
failed to open file '/tmp/fraser/savedObjects/Data_Analysis/rawCountsJ.h5'

which tells me it's not updating the absolute path. The same thing happens if I use the dir= arg instead of file=.

c-mertes commented 4 years ago

Thanks for reporting this @bw2 . Could you give us the sessionInfo()?

We just came across the problem a week ago in r4.0 but not in 3.6. I'm currently working on a fix.

bw2 commented 4 years ago

I'm using r4.0

> sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.5

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

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] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] org.Hs.eg.db_3.11.1                      TxDb.Hsapiens.UCSC.hg38.knownGene_3.10.0
 [3] GenomicFeatures_1.40.0                   AnnotationDbi_1.50.0                    
 [5] ggsci_2.9                                RColorBrewer_1.1-2                      
 [7] plotly_4.9.2.1                           purrr_0.3.4                             
 [9] dplyr_0.8.5                              stringr_1.4.0                           
[11] ggpubr_0.3.0                             ggplot2_3.3.0                           
[13] FRASER_1.1.1                             SummarizedExperiment_1.18.1             
[15] DelayedArray_0.14.0                      matrixStats_0.56.0                      
[17] Biobase_2.48.0                           Rsamtools_2.4.0                         
[19] Biostrings_2.56.0                        XVector_0.28.0                          
[21] GenomicRanges_1.40.0                     GenomeInfoDb_1.24.0                     
[23] IRanges_2.22.1                           S4Vectors_0.26.0                        
[25] BiocGenerics_0.34.0                      data.table_1.12.8                       
[27] BiocParallel_1.22.0                     

loaded via a namespace (and not attached):
 [1] VGAM_1.1-3                colorspace_1.4-1          ggsignif_0.6.0            ellipsis_0.3.0           
 [5] rio_0.5.16                rstudioapi_0.11           farver_2.0.3              bit64_0.9-7              
 [9] fansi_0.4.1               splines_4.0.0             R.methodsS3_1.8.0         PRROC_1.3.1              
[13] jsonlite_1.6.1            broom_0.5.6               dbplyr_1.4.3              R.oo_1.23.0              
[17] pheatmap_1.0.12           HDF5Array_1.16.0          compiler_4.0.0            httr_1.4.1               
[21] backports_1.1.6           assertthat_0.2.1          Matrix_1.2-18             lazyeval_0.2.2           
[25] cli_2.0.2                 htmltools_0.4.0           prettyunits_1.1.1         tools_4.0.0              
[29] gtable_0.3.0              glue_1.4.0                GenomeInfoDbData_1.2.3    rappdirs_0.3.1           
[33] Rcpp_1.0.4.6              carData_3.0-3             cellranger_1.1.0          vctrs_0.2.4              
[37] nlme_3.1-147              rtracklayer_1.48.0        DelayedMatrixStats_1.10.0 openxlsx_4.1.5           
[41] lifecycle_0.2.0           rstatix_0.5.0             XML_3.99-0.3              zlibbioc_1.34.0          
[45] scales_1.1.0              BSgenome_1.56.0           pcaMethods_1.80.0         hms_0.5.3                
[49] rhdf5_2.32.0              BBmisc_1.11               curl_4.3                  memoise_1.1.0            
[53] biomaRt_2.44.0            stringi_1.4.6             RSQLite_2.2.0             checkmate_2.0.0          
[57] zip_2.0.4                 Rsubread_2.2.1            rlang_0.4.6               pkgconfig_2.0.3          
[61] bitops_1.0-6              lattice_0.20-41           Rhdf5lib_1.10.0           GenomicAlignments_1.24.0 
[65] htmlwidgets_1.5.1         cowplot_1.0.0             bit_1.1-15.2              tidyselect_1.0.0         
[69] magrittr_1.5              R6_2.4.1                  generics_0.0.2            DBI_1.1.0                
[73] pillar_1.4.4              haven_2.2.0               foreign_0.8-79            withr_2.2.0              
[77] abind_1.4-5               RCurl_1.98-1.2            tibble_3.0.1              crayon_1.3.4             
[81] car_3.0-7                 utf8_1.1.4                BiocFileCache_1.12.0      progress_1.2.2           
[85] grid_4.0.0                readxl_1.3.1              blob_1.2.1                forcats_0.5.0            
[89] digest_0.6.25             tidyr_1.0.3               extraDistr_1.8.11         R.utils_2.9.2            
[93] openssl_1.4.1             munsell_0.5.0             viridisLite_0.3.0         askpass_1.1    
c-mertes commented 4 years ago

@bw2 I found the problem. its due to a change in the assay function which changed how they access the delayed arrays.

Could you try out the bugfix from the dev branch fix_11? It should solve your problem?

bw2 commented 4 years ago

Hi Christian, I've been using a work-around by putting files in the same path as where I will load them later. I'm currently having trouble installing R packages from a github branch using install_github("c-mertes/FRASER@fix_11") because of issues with MacOSX command line tools, so can't test this easily, but I'm all set with this issue.

c-mertes commented 4 years ago

Ok. Then i guess, I can close this issue. If you come across it again after applying the patch please let me know so we can reopen it.