tgirke / systemPipeRdata

NGS workflow templates and sample data
9 stars 8 forks source link

RiBoSeq Pipeline throws errors when preprocessing #10

Closed yeroslaviz closed 3 years ago

yeroslaviz commented 3 years ago

I decided to create a new issue, as I can't see how they connect.

i have updated both packages(sessionInfor() below). Now after reading in the target file, I get the following error, when trying to preprocess the (trim) the data.

command:

preprocessReads(args = trim, Fct = iterTrim, batchsize = 1e+05, 
    overwrite = TRUE, compress = TRUE)

error:

Error in h(simpleError(msg, call)) : error in evaluating the argument 'i' in selecting a method for function '[': invalid class “SRFilterResult” object: superclass "Mnumeric" not defined in the environment of the object's class

I can't figure out, what cause this problem, as nothing was done yet. I tried it both with RStudio and within the terminal, but the error persists.

I'm not sure, to what extent it is connected to the error I posted in the previous issue, but the update of the package made it happens

I would appreciate your help again in fixing it.

thanks Assa

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

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] systemPipeR_1.25.14         ShortRead_1.48.0            GenomicAlignments_1.26.0    SummarizedExperiment_1.20.0
 [5] Biobase_2.50.0              MatrixGenerics_1.2.1        matrixStats_0.58.0          BiocParallel_1.24.1        
 [9] Rsamtools_2.6.0             Biostrings_2.58.0           XVector_0.30.0              GenomicRanges_1.42.0       
[13] GenomeInfoDb_1.26.7         IRanges_2.24.1              S4Vectors_0.28.1            BiocGenerics_0.36.1        

loaded via a namespace (and not attached):
  [1] colorspace_2.0-1         rjson_0.2.20             hwriter_1.3.2            ellipsis_0.3.2          
  [5] rprojroot_2.0.2          rstudioapi_0.13          remotes_2.3.0            bit64_4.0.5             
  [9] AnnotationDbi_1.52.0     fansi_0.4.2              xml2_1.3.2               cachem_1.0.4            
 [13] knitr_1.33               jsonlite_1.7.2           annotate_1.68.0          GO.db_3.12.1            
 [17] dbplyr_2.1.1             png_0.1-7                BiocManager_1.30.12      compiler_4.0.3          
 [21] httr_1.4.2               backports_1.2.1          assertthat_0.2.1         Matrix_1.3-3            
 [25] fastmap_1.1.0            limma_3.46.0             cli_2.5.0                htmltools_0.5.1.1       
 [29] prettyunits_1.1.1        tools_4.0.3              gtable_0.3.0             glue_1.4.2              
 [33] GenomeInfoDbData_1.2.4   dplyr_1.0.6              rsvg_2.1.2               batchtools_0.9.15       
 [37] rappdirs_0.3.3           V8_3.4.2                 Rcpp_1.0.6               vctrs_0.3.8             
 [41] debugme_1.1.0            rtracklayer_1.50.0       xfun_0.22                stringr_1.4.0           
 [45] ps_1.6.0                 lifecycle_1.0.0          XML_3.99-0.6             edgeR_3.32.1            
 [49] zlibbioc_1.36.0          scales_1.1.1             BSgenome_1.58.0          VariantAnnotation_1.36.0
 [53] hms_1.0.0                RColorBrewer_1.1-2       yaml_2.2.1               curl_4.3.1              
 [57] memoise_2.0.0            ggplot2_3.3.3            biomaRt_2.46.3           latticeExtra_0.6-29     
 [61] stringi_1.5.3            RSQLite_2.2.7            checkmate_2.0.0          GenomicFeatures_1.42.3  
 [65] pkgbuild_1.2.0           DOT_0.1                  rlang_0.4.11             pkgconfig_2.0.3         
 [69] bitops_1.0-7             evaluate_0.14            lattice_0.20-44          purrr_0.3.4             
 [73] bit_4.0.4                processx_3.5.2           tidyselect_1.1.1         magrittr_2.0.1          
 [77] R6_2.5.0                 generics_0.1.0           base64url_1.4            DelayedArray_0.16.3     
 [81] DBI_1.1.1                pillar_1.6.0             withr_2.4.2              RCurl_1.98-1.3          
 [85] tibble_3.1.1             crayon_1.4.1             utf8_1.2.1               BiocFileCache_1.14.0    
 [89] rmarkdown_2.7            jpeg_0.1-8.1             progress_1.2.2           locfit_1.5-9.4          
 [93] grid_4.0.3               data.table_1.14.0        blob_1.2.1               callr_3.7.0             
 [97] digest_0.6.27            xtable_1.8-4             brew_1.0-6               openssl_1.4.4           
[101] munsell_0.5.0            askpass_1.1             
dcassol commented 3 years ago

Hi @yeroslaviz, I have a guess about what is happing, which is an incompatibility between packages versions. Please could you please test:

BiocManager::version()

Because of the R version you are using, I believe that you are running Bioc3.12, and you installed systemPipeR devel version that requires Bioc3.13. Also, you can try

BiocManager::valid()

to check with you have any out-of-date or too new packages. To safe install systemPipeR, you can try:

BiocManager::install("systemPipeR", version="3.12")

Please let me know if that fixes the issue. All the best, Daniela

yeroslaviz commented 3 years ago

Hi @dcassol,

my bioconductor version is indeed 3.12, but so is the package version of SystemPipeR (1.24.6). I have installed it with the command you posted but it didn't correct the problem.

BiocManager::valid() gave me a few out-of-date packages and even one too new. I corrected them all.

this is now the sessionInfo()

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

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] systemPipeRdata_1.18.2      systemPipeR_1.24.6          ShortRead_1.48.0            GenomicAlignments_1.26.0   
 [5] SummarizedExperiment_1.20.0 Biobase_2.50.0              MatrixGenerics_1.2.1        matrixStats_0.58.0         
 [9] BiocParallel_1.24.1         Rsamtools_2.6.0             Biostrings_2.58.0           XVector_0.30.0             
[13] GenomicRanges_1.42.0        GenomeInfoDb_1.26.7         IRanges_2.24.1              S4Vectors_0.28.1           
[17] BiocGenerics_0.36.1         BiocManager_1.30.12        

loaded via a namespace (and not attached):
  [1] colorspace_2.0-1         rjson_0.2.20             hwriter_1.3.2            ellipsis_0.3.2          
  [5] rstudioapi_0.13          remotes_2.3.0            bit64_4.0.5              AnnotationDbi_1.52.0    
  [9] fansi_0.4.2              xml2_1.3.2               splines_4.0.3            cachem_1.0.4            
 [13] knitr_1.33               jsonlite_1.7.2           annotate_1.68.0          GO.db_3.12.1            
 [17] dbplyr_2.1.1             png_0.1-7                pheatmap_1.0.12          graph_1.68.0            
 [21] compiler_4.0.3           httr_1.4.2               GOstats_2.56.0           backports_1.2.1         
 [25] assertthat_0.2.1         Matrix_1.3-3             fastmap_1.1.0            cli_2.5.0               
 [29] limma_3.46.0             htmltools_0.5.1.1        prettyunits_1.1.1        tools_4.0.3             
 [33] gtable_0.3.0             glue_1.4.2               GenomeInfoDbData_1.2.4   Category_2.56.0         
 [37] dplyr_1.0.6              rsvg_2.1.2               batchtools_0.9.15        rappdirs_0.3.3          
 [41] V8_3.4.2                 Rcpp_1.0.6               vctrs_0.3.8              debugme_1.1.0           
 [45] rtracklayer_1.50.0       xfun_0.22                stringr_1.4.0            lifecycle_1.0.0         
 [49] XML_3.99-0.6             edgeR_3.32.1             zlibbioc_1.36.0          scales_1.1.1            
 [53] BSgenome_1.58.0          VariantAnnotation_1.36.0 hms_1.0.0                RBGL_1.66.0             
 [57] RColorBrewer_1.1-2       yaml_2.2.1               curl_4.3.1               memoise_2.0.0           
 [61] ggplot2_3.3.3            biomaRt_2.46.3           latticeExtra_0.6-29      stringi_1.5.3           
 [65] RSQLite_2.2.7            genefilter_1.72.1        checkmate_2.0.0          GenomicFeatures_1.42.3  
 [69] DOT_0.1                  rlang_0.4.11             pkgconfig_2.0.3          bitops_1.0-7            
 [73] evaluate_0.14            lattice_0.20-44          purrr_0.3.4              bit_4.0.4               
 [77] tidyselect_1.1.1         GSEABase_1.52.1          AnnotationForge_1.32.0   magrittr_2.0.1          
 [81] R6_2.5.0                 generics_0.1.0           base64url_1.4            DelayedArray_0.16.3     
 [85] DBI_1.1.1                pillar_1.6.0             withr_2.4.2              survival_3.2-11         
 [89] RCurl_1.98-1.3           tibble_3.1.1             crayon_1.4.1             utf8_1.2.1              
 [93] BiocFileCache_1.14.0     rmarkdown_2.7            jpeg_0.1-8.1             progress_1.2.2          
 [97] locfit_1.5-9.4           grid_4.0.3               data.table_1.14.0        blob_1.2.1              
[101] Rgraphviz_2.34.0         digest_0.6.27            xtable_1.8-4             brew_1.0-6              
[105] openssl_1.4.4            munsell_0.5.0            askpass_1.1   

But I still get the same error.

any Ideas?

Assa

dcassol commented 3 years ago

Hi @yeroslaviz, I cannot reproduce the error locally, however, this class (SRFilterResult) is from ShortReads package. Could you please try a quick test after loading systemPipeR?

fa <- srFilter(function(x) x %% 2 == 0, "Even")
fb <- srFilter(function(x) x %% 2 == 1, "Odd")

x <- 1:10
fa(x) | fb(x)
fa(x) & fb(x)

If any error return from this test, please try to install again ShortReads.

yeroslaviz commented 3 years ago

Yes, this gives me the same error

> fa(x) | fb(x)
Error in validObject(.Object) : 
  invalid class “SRFilterResult” object: superclass "Mnumeric" not defined in the environment of the object's class
> fa(x) & fb(x)
Error in validObject(.Object) : 
  invalid class “SRFilterResult” object: superclass "Mnumeric" not defined in the environment of the object's class
yeroslaviz commented 3 years ago

ok, i have reinstalled all the needed packages. Now it trims the files.

thanks for this.