Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in MatrixGenerics #10

Closed
yojetsharma opened this issue Sep 23, 2022 · 18 comments
Closed

Error in MatrixGenerics #10

yojetsharma opened this issue Sep 23, 2022 · 18 comments
Labels
bug Something isn't working

Comments

@yojetsharma
Copy link

I ran the Joint RNA and ATAC multiomic tutorial till the Peak Calling and added MACS2 peak set to the Seurat Object (d149 in this case) and started running Pando from thereon. But later I get error in MatrixGenerics:::. I am not sure what I did wrong. Please help.

library(Pando)
data(motifs)
d149.pando <-Seurat::FindVariableFeatures(d149, assay='RNA')
Calculating gene variances
0%   10   20   30   40   50   60   70   80   90   100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Calculating feature variances of standardized and clipped values
0%   10   20   30   40   50   60   70   80   90   100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
> d149.pando <- initiate_grn(d149.pando)
> d149.pando <- find_motifs(
    d149.pando,
    pfm = motifs,
    genome = BSgenome.Hsapiens.UCSC.hg38
)
Adding TF info
Building motif matrix
Finding motif positions
Creating Motif object
> d149.pando <- infer_grn(d149.pando)
Selecting candidate regulatory regions near genes
Error in MatrixGenerics:::.load_next_suggested_package_to_search(x) : 
  Failed to find a rowMaxs() method for lgCMatrix objects.


sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /ncbs_gs/nlsas_data/usershares/praghu/yojetsharma/.conda/envs/Signac/lib/libopenblasp-r0.3.21.so

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

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

other attached packages:
 [1] DelayedMatrixStats_1.19.0         DelayedArray_0.23.2              
 [3] Matrix_1.5-1                      MatrixGenerics_1.9.1             
 [5] matrixStats_0.62.0                Pando_0.5.1                      
 [7] BSgenome.Hsapiens.UCSC.hg38_1.4.4 BSgenome_1.65.2                  
 [9] rtracklayer_1.57.0                Biostrings_2.65.6                
[11] XVector_0.37.1                    EnsDb.Hsapiens.v86_2.99.0        
[13] ensembldb_2.21.5                  AnnotationFilter_1.21.0          
[15] GenomicFeatures_1.49.7            AnnotationDbi_1.59.1             
[17] Biobase_2.57.1                    GenomicRanges_1.49.1             
[19] GenomeInfoDb_1.33.7               IRanges_2.31.2                   
[21] S4Vectors_0.35.4                  BiocGenerics_0.43.4              
[23] sp_1.5-0                          SeuratObject_4.1.2               
[25] Seurat_4.2.0                      Signac_1.8.0                     

loaded via a namespace (and not attached):
  [1] rappdirs_0.3.3              scattermore_0.8            
  [3] R.methodsS3_1.8.2           tidyr_1.2.1                
  [5] ggplot2_3.3.6               bit64_4.0.5                
  [7] knitr_1.40                  R.utils_2.12.0             
  [9] irlba_2.3.5                 data.table_1.14.2          
 [11] rpart_4.1.16                KEGGREST_1.37.3            
 [13] TFBSTools_1.35.0            RCurl_1.98-1.8             
 [15] generics_0.1.3              cowplot_1.1.1              
 [17] RSQLite_2.2.17              RANN_2.6.1                 
 [19] future_1.28.0               ggpointdensity_0.1.0       
 [21] bit_4.0.4                   tzdb_0.3.0                 
 [23] spatstat.data_2.2-0         xml2_1.3.3                 
 [25] httpuv_1.6.6                SummarizedExperiment_1.27.3
 [27] assertthat_0.2.1            DirichletMultinomial_1.39.0
 [29] viridis_0.6.2               xfun_0.33                  
 [31] hms_1.1.2                   promises_1.2.0.1           
 [33] fansi_1.0.3                 restfulr_0.0.15            
 [35] progress_1.2.2              caTools_1.18.2             
 [37] dbplyr_2.2.1                igraph_1.3.5               
 [39] DBI_1.1.3                   htmlwidgets_1.5.4          
 [41] spatstat.geom_2.4-0         purrr_0.3.4                
 [43] ellipsis_0.3.2              dplyr_1.0.10               
 [45] backports_1.4.1             annotate_1.75.0            
 [47] biomaRt_2.53.2              deldir_1.0-6               
 [49] sparseMatrixStats_1.9.0     vctrs_0.4.1                
 [51] ROCR_1.0-11                 abind_1.4-5                
 [53] cachem_1.0.6                withr_2.5.0                
 [55] grr_0.9.5                   ggforce_0.3.4              
 [57] progressr_0.11.0            checkmate_2.1.0            
 [59] sctransform_0.3.5           GenomicAlignments_1.33.1   
 [61] prettyunits_1.1.1           goftest_1.2-3              
 [63] cluster_2.1.4               lazyeval_0.2.2             
 [65] seqLogo_1.63.0              crayon_1.5.1               
 [67] hdf5r_1.3.6                 pkgconfig_2.0.3            
 [69] tweenr_2.0.2                nlme_3.1-159               
 [71] ProtGenerics_1.29.0         nnet_7.3-17                
 [73] pals_1.7                    rlang_1.0.5                
 [75] globals_0.16.1              lifecycle_1.0.2            
 [77] miniUI_0.1.1.1              filelock_1.0.2             
 [79] BiocFileCache_2.5.0         dichromat_2.0-0.1          
 [81] polyclip_1.10-0             lmtest_0.9-40              
 [83] Matrix.utils_0.9.8          zoo_1.8-11                 
 [85] base64enc_0.1-3             ggridges_0.5.3             
 [87] png_0.1-7                   viridisLite_0.4.1          
 [89] rjson_0.2.21                bitops_1.0-7               
 [91] R.oo_1.25.0                 KernSmooth_2.23-20         
 [93] blob_1.2.3                  stringr_1.4.1              
 [95] parallelly_1.32.1           spatstat.random_2.2-0      
 [97] readr_2.1.2                 jpeg_0.1-9                 
 [99] CNEr_1.33.0                 scales_1.2.1               
[101] memoise_2.0.1               magrittr_2.0.3             
[103] plyr_1.8.7                  ica_1.0-3                  
[105] zlibbioc_1.43.0             compiler_4.2.0             
[107] BiocIO_1.7.1                RColorBrewer_1.1-3         
[109] fitdistrplus_1.1-8          Rsamtools_2.13.4           
[111] cli_3.4.0                   listenv_0.8.0              
[113] patchwork_1.1.2             pbapply_1.5-0              
[115] htmlTable_2.4.1             Formula_1.2-4              
[117] MASS_7.3-58.1               mgcv_1.8-40                
[119] tidyselect_1.1.2            stringi_1.7.8              
[121] yaml_2.3.5                  latticeExtra_0.6-30        
[123] ggrepel_0.9.1               grid_4.2.0                 
[125] VariantAnnotation_1.43.3    fastmatch_1.1-3            
[127] tools_4.2.0                 future.apply_1.9.1         
[129] parallel_4.2.0              rstudioapi_0.14            
[131] TFMPvalue_0.0.8             foreign_0.8-82             
[133] gridExtra_2.3               farver_2.1.1               
[135] Rtsne_0.16                  ggraph_2.0.6               
[137] BiocManager_1.30.18         digest_0.6.29              
[139] rgeos_0.5-10                pracma_2.4.2               
[141] shiny_1.7.2                 motifmatchr_1.19.0         
[143] Rcpp_1.0.9                  later_1.3.0                
[145] RcppAnnoy_0.0.19            httr_1.4.4                 
[147] biovizBase_1.45.0           colorspace_2.0-3           
[149] XML_3.99-0.10               tensor_1.5                 
[151] reticulate_1.26             splines_4.2.0              
[153] uwot_0.1.14                 RcppRoll_0.3.0             
[155] spatstat.utils_2.3-1        graphlayouts_0.8.1         
[157] mapproj_1.2.8               plotly_4.10.0              
[159] xtable_1.8-4                jsonlite_1.8.0             
[161] poweRlaw_0.70.6             tidygraph_1.2.2            
[163] R6_2.5.1                    Hmisc_4.7-1                
[165] pillar_1.8.1                htmltools_0.5.3            
[167] mime_0.12                   glue_1.6.2                 
[169] fastmap_1.1.0               BiocParallel_1.31.12       
[171] codetools_0.2-18            maps_3.4.0                 
[173] utf8_1.2.2                  lattice_0.20-45            
[175] spatstat.sparse_2.1-1       tibble_3.1.8               
[177] curl_4.3.2                  leiden_0.4.3               
[179] gtools_3.9.3                GO.db_3.15.0               
[181] interp_1.1-3                survival_3.4-0             
[183] munsell_0.5.0               GenomeInfoDbData_1.2.8     
[185] reshape2_1.4.4              gtable_0.3.1               
[187] spatstat.core_2.4-4
@joschif
Copy link
Collaborator

joschif commented Sep 26, 2022

Hi @yojetsharma, unfortunately I'm unsure what causes this, since the error seems to be thrown by MatrixGenerics which is not a direct dependency of Pando. I will look into it and try to reproduce the error.

@yojetsharma
Copy link
Author

yojetsharma commented Sep 26, 2022 via email

@joschif
Copy link
Collaborator

joschif commented Sep 26, 2022

If you like, you can try if installing older versions of MatrixGenerics or sparseMatrixStats might solve the issue. I have them at 1.6.0 currently and I'm not experiencing the issue

@yojetsharma
Copy link
Author

yojetsharma commented Sep 26, 2022 via email

@joschif
Copy link
Collaborator

joschif commented Sep 26, 2022

My R is version 4.1.2 and so far I haven't tested Pando on newer versions, but usually package versions and R versions are not necessarily interlinked

@yojetsharma
Copy link
Author

yojetsharma commented Sep 26, 2022 via email

@yojetsharma
Copy link
Author

yojetsharma commented Sep 26, 2022 via email

@yojetsharma
Copy link
Author

yojetsharma commented Sep 27, 2022 via email

@joschif
Copy link
Collaborator

joschif commented Sep 27, 2022

I'm not sure if there is a functional difference the between and devtools function... We will test it on the new versions and let you know. Also it might be helpful if you could send the full error traceback by typing traceback() right after you get the error

@johnblair7
Copy link

I am also having this error - here is the traceback:

> traceback()
8: stop(short_errmsg)
7: MatrixGenerics:::.load_next_suggested_package_to_search(x)
6: rowMaxs(peaks2motif)
5: rowMaxs(peaks2motif)
4: fit_grn_models.SeuratPlus(object = object, genes = genes, network_name = network_name, 
       peak_to_gene_method = peak_to_gene_method, upstream = upstream, 
       downstream = downstream, extend = extend, only_tss = only_tss, 
       parallel = parallel, tf_cor = tf_cor, peak_cor = peak_cor, 
       aggregate_rna_col = aggregate_rna_col, aggregate_peaks_col = aggregate_peaks_col, 
       method = method, alpha = alpha, family = family, interaction_term = interaction_term, 
       adjust_method = adjust_method, scale = scale, verbose = verbose, 
       ...)
3: fit_grn_models(object = object, genes = genes, network_name = network_name, 
       peak_to_gene_method = peak_to_gene_method, upstream = upstream, 
       downstream = downstream, extend = extend, only_tss = only_tss, 
       parallel = parallel, tf_cor = tf_cor, peak_cor = peak_cor, 
       aggregate_rna_col = aggregate_rna_col, aggregate_peaks_col = aggregate_peaks_col, 
       method = method, alpha = alpha, family = family, interaction_term = interaction_term, 
       adjust_method = adjust_method, scale = scale, verbose = verbose, 
       ...)
2: infer_grn.SeuratPlus(seurat_object, peak_to_gene_method = "Signac")
1: infer_grn(seurat_object, peak_to_gene_method = "Signac")

@yojetsharma
Copy link
Author

yojetsharma commented Sep 27, 2022 via email

@johnblair7
Copy link

johnblair7 commented Sep 27, 2022

Working on this, it looks like the problem is at line 255 of the function

peaks_with_motif <- as.logical(rowMaxs(peaks2motif))

Where basically there no longer seems to be a function (from some package that got updated i assume) to call a maximum value (aka true) on a logical matrix. I am far too stupid to figure it out but that does appear to be the problem. As a workaround, I just made the function only use the peaks that are in genes peaks_at_gene and ignore the peaks_with_motif for the next set of things. I think there is a very low likelihood that a peak won't have a single TF motif in it, considering how common they are, so i think it's not a big deal to remove it, but maybe I am misunderstanding that part of the function!

Anyways, I removed it and it seems to be running fine now, so we'll see....

@yojetsharma
Copy link
Author

Working on this, it looks like the problem is at line 255 of the function

peaks_with_motif <- as.logical(rowMaxs(peaks2motif))

Where basically there no longer seems to be a function (from some package that got updated i assume) to call a maximum value (aka true) on a logical matrix. I am far too stupid to figure it out but that does appear to be the problem. As a workaround, I just made the function only use the peaks that are in genes peaks_at_gene and ignore the peaks_with_motif for the next set of things. I think there is a very low likelihood that a peak won't have a single TF motif in it, considering how common they are, so i think it's not a big deal to remove it, but maybe I am misunderstanding that part of the function!

Anyways, I removed it and it seems to be running fine now, so we'll see....

I’m new to this so can you please provide the details of how you removed it? And how to make the function use only the peaks that are in genes peaks_at_gene and ignore the peaks_with_motif?

@joschif
Copy link
Collaborator

joschif commented Sep 28, 2022

Great, thank you for the detailed descriptions and suggested fix. I assume @johnblair7 you are also running a more recent version of R and/or MatrixGenerics? I'll test it and will try to push a new version some time this week.

@johnblair7
Copy link

Thanks Jonas, Here is my session info - Running R4.1.3 and MatrixGenerics 1.6. Also my fix doesn't seem to fully work as I ran the function overnight just now and it still didn't finish (trying to do 1605 genes? is that too many?)

@yojetsharma I just "forked" pando into my own repository (basically means that i copied the whole code to my own profile) and then went into where the "infer_grn" scripts were (R/grn.R from the main folder) and just deleted/edited those two lines. Then I uninstalled the version of pando that I had and reinstalled my own version using devtools::install_github('johnblair7/pando2') and ran everything as I would in pando "normal". But seeing as how it didn't end up running all the way through (no error, just timed out), its probably better just to wait for @joschif to look into it and deal with it properly

> sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

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

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

other attached packages:
 [1] BSgenome.Hsapiens.UCSC.hg38_1.4.4 BSgenome_1.62.0                   rtracklayer_1.54.0                Biostrings_2.62.0                
 [5] XVector_0.34.0                    GenomicRanges_1.46.1              GenomeInfoDb_1.30.1               IRanges_2.28.0                   
 [9] S4Vectors_0.32.4                  BiocGenerics_0.40.0               sp_1.5-0                          SeuratObject_4.1.2               
[13] Seurat_4.2.0                      Pando_0.5.1                      

loaded via a namespace (and not attached):
  [1] utf8_1.2.2                  reticulate_1.26             tidyselect_1.1.2            htmlwidgets_1.5.4           grid_4.1.3                 
  [6] BiocParallel_1.28.3         Rtsne_0.16                  devtools_2.4.4              munsell_0.5.0               codetools_0.2-18           
 [11] ica_1.0-3                   future_1.28.0               miniUI_0.1.1.1              withr_2.5.0                 spatstat.random_2.2-0      
 [16] colorspace_2.0-3            progressr_0.11.0            Biobase_2.54.0              rstudioapi_0.14             ROCR_1.0-11                
 [21] tensor_1.5                  listenv_0.8.0               MatrixGenerics_1.6.0        GenomeInfoDbData_1.2.7      polyclip_1.10-0            
 [26] farver_2.1.1                parallelly_1.32.1           vctrs_0.4.1                 generics_0.1.3              R6_2.5.1                   
 [31] graphlayouts_0.8.1          pals_1.7                    DelayedArray_0.20.0         bitops_1.0-7                spatstat.utils_2.3-1       
 [36] cachem_1.0.6                assertthat_0.2.1            promises_1.2.0.1            BiocIO_1.4.0                scales_1.2.1               
 [41] ggraph_2.0.6                rgeos_0.5-9                 gtable_0.3.1                globals_0.16.1              processx_3.7.0             
 [46] goftest_1.2-3               tidygraph_1.2.2             rlang_1.0.6                 RcppRoll_0.3.0              splines_4.1.3              
 [51] lazyeval_0.2.2              dichromat_2.0-0.1           spatstat.geom_2.4-0         yaml_2.3.5                  reshape2_1.4.4             
 [56] abind_1.4-5                 httpuv_1.6.6                tools_4.1.3                 usethis_2.1.6               ggplot2_3.3.6              
 [61] ellipsis_0.3.2              spatstat.core_2.4-4         RColorBrewer_1.1-3          sessioninfo_1.2.2           ggridges_0.5.4             
 [66] Rcpp_1.0.9                  plyr_1.8.7                  sparseMatrixStats_1.6.0     zlibbioc_1.40.0             purrr_0.3.4                
 [71] RCurl_1.98-1.8              ps_1.7.1                    prettyunits_1.1.1           rpart_4.1.16                deldir_1.0-6               
 [76] pbapply_1.5-0               viridis_0.6.2               cowplot_1.1.1               urlchecker_1.0.1            zoo_1.8-11                 
 [81] SummarizedExperiment_1.24.0 ggrepel_0.9.1               cluster_2.1.3               fs_1.5.2                    magrittr_2.0.3             
 [86] data.table_1.14.2           scattermore_0.8             lmtest_0.9-40               RANN_2.6.1                  fitdistrplus_1.1-8         
 [91] Signac_1.8.0                matrixStats_0.62.0          pkgload_1.3.0               patchwork_1.1.2             mime_0.12                  
 [96] xtable_1.8-4                XML_3.99-0.10               gridExtra_2.3               compiler_4.1.3              tibble_3.1.8               
[101] maps_3.4.0                  KernSmooth_2.23-20          crayon_1.5.1                ggpointdensity_0.1.0        htmltools_0.5.3            
[106] mgcv_1.8-40                 later_1.3.0                 tidyr_1.2.1                 DBI_1.1.3                   tweenr_2.0.2               
[111] MASS_7.3-56                 Matrix_1.5-1                cli_3.4.1                   parallel_4.1.3              igraph_1.3.5               
[116] pkgconfig_2.0.3             GenomicAlignments_1.30.0    plotly_4.10.0               spatstat.sparse_2.1-1       stringr_1.4.1              
[121] callr_3.7.2                 digest_0.6.29               sctransform_0.3.5           RcppAnnoy_0.0.19            spatstat.data_2.2-0        
[126] leiden_0.4.3                fastmatch_1.1-3             uwot_0.1.14                 restfulr_0.0.15             shiny_1.7.2                
[131] Rsamtools_2.10.0            rjson_0.2.21                lifecycle_1.0.2             nlme_3.1-159                jsonlite_1.8.0             
[136] mapproj_1.2.8               viridisLite_0.4.1           fansi_1.0.3                 pillar_1.8.1                lattice_0.20-45            
[141] fastmap_1.1.0               httr_1.4.4                  pkgbuild_1.3.1              survival_3.4-0              glue_1.6.2                 
[146] remotes_2.4.2               png_0.1-7                   ggforce_0.3.4               presto_1.0.0                stringi_1.7.8              
[151] profvis_0.3.7               memoise_2.0.1               dplyr_1.0.10                irlba_2.3.5                 future.apply_1.9.1   

@joschif
Copy link
Collaborator

joschif commented Oct 1, 2022

Hi all, it seems like there are some issues with some of the matrix classes of newer Matrix versions. I have pushed a new commit to the devel branch which should fix the above issue, but I haven't had time to fully test it. Also I expect that there will be other problems related to this. I will look into it when I'm back from holiday end of October.

@joschif joschif added the bug Something isn't working label Oct 26, 2022
@joschif
Copy link
Collaborator

joschif commented Oct 26, 2022

I now had some time to test a new version for 4.2 and pushed it to main. I believe this issue should be fixed, but please let me know how it works for you.

@Harrison-Q-Ma
Copy link

Thank you guys for making such a great tool and I am trying to use it in my research. However I am still running into the same issue as people were describing above. Here's the session info and error:

Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.2 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0

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

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

other attached packages:
 [1] sparseMatrixStats_1.11.1           MatrixGenerics_1.10.0             
 [3] matrixStats_0.63.0                 TFBSTools_1.36.0                  
 [5] JASPAR2022_0.99.7                  BiocFileCache_2.6.1               
 [7] dbplyr_2.3.2                       future_1.32.0                     
 [9] doParallel_1.0.17                  iterators_1.0.14                  
[11] foreach_1.5.2                      Signac_1.9.0                      
[13] lubridate_1.9.2                    forcats_1.0.0                     
[15] stringr_1.5.0                      dplyr_1.1.1                       
[17] purrr_1.0.1                        readr_2.1.4                       
[19] tidyr_1.3.0                        tibble_3.2.1                      
[21] ggplot2_3.4.2                      tidyverse_2.0.0                   
[23] EnsDb.Mmusculus.v79_2.99.0         ensembldb_2.22.0                  
[25] AnnotationFilter_1.22.0            GenomicFeatures_1.50.4            
[27] AnnotationDbi_1.60.2               Biobase_2.58.0                    
[29] BSgenome.Mmusculus.UCSC.mm10_1.4.3 BSgenome_1.66.3                   
[31] rtracklayer_1.58.0                 Biostrings_2.66.0                 
[33] XVector_0.38.0                     GenomicRanges_1.50.2              
[35] GenomeInfoDb_1.34.9                IRanges_2.32.0                    
[37] S4Vectors_0.36.2                   BiocGenerics_0.44.0               
[39] SeuratObject_4.1.3                 Seurat_4.3.0                      
[41] Pando_1.0.3                       

loaded via a namespace (and not attached):
  [1] rappdirs_0.3.3              pbdZMQ_0.3-9               
  [3] scattermore_0.8             R.methodsS3_1.8.2          
  [5] bit64_4.0.5                 irlba_2.3.5.1              
  [7] DelayedArray_0.24.0         R.utils_2.12.2             
  [9] data.table_1.14.8           KEGGREST_1.38.0            
 [11] RCurl_1.98-1.12             generics_0.1.3             
 [13] cowplot_1.1.1               RSQLite_2.3.1              
 [15] RANN_2.6.1                  ggpointdensity_0.1.0       
 [17] bit_4.0.5                   tzdb_0.3.0                 
 [19] spatstat.data_3.0-1         xml2_1.3.3                 
 [21] httpuv_1.6.9                SummarizedExperiment_1.28.0
 [23] DirichletMultinomial_1.40.0 viridis_0.6.2              
 [25] hms_1.1.3                   evaluate_0.20              
 [27] promises_1.2.0.1            fansi_1.0.4                
 [29] restfulr_0.0.15             progress_1.2.2             
 [31] caTools_1.18.2              igraph_1.4.2               
 [33] DBI_1.1.3                   htmlwidgets_1.6.2          
 [35] spatstat.geom_3.1-0         ellipsis_0.3.2             
 [37] annotate_1.76.0             biomaRt_2.54.1             
 [39] deldir_1.0-6                vctrs_0.6.1                
 [41] ROCR_1.0-11                 abind_1.4-5                
 [43] cachem_1.0.7                withr_2.5.0                
 [45] ggforce_0.4.1               grr_0.9.5                  
 [47] progressr_0.13.0            sctransform_0.3.5          
 [49] GenomicAlignments_1.34.1    prettyunits_1.1.1          
 [51] goftest_1.2-3               cluster_2.1.4              
 [53] IRdisplay_1.1               lazyeval_0.2.2             
 [55] seqLogo_1.64.0              crayon_1.5.2               
 [57] spatstat.explore_3.1-0      pkgconfig_2.0.3            
 [59] tweenr_2.0.2                nlme_3.1-162               
 [61] ProtGenerics_1.30.0         pals_1.7                   
 [63] rlang_1.1.0                 globals_0.16.2             
 [65] lifecycle_1.0.3             miniUI_0.1.1.1             
 [67] filelock_1.0.2              dichromat_2.0-0.1          
 [69] polyclip_1.10-4             lmtest_0.9-40              
 [71] Matrix_1.5-1                IRkernel_1.3.2             
 [73] zoo_1.8-12                  base64enc_0.1-3            
 [75] ggridges_0.5.4              png_0.1-8                  
 [77] viridisLite_0.4.1           rjson_0.2.21               
 [79] bitops_1.0-7                R.oo_1.25.0                
 [81] KernSmooth_2.23-20          blob_1.2.4                 
 [83] parallelly_1.35.0           spatstat.random_3.1-4      
 [85] CNEr_1.34.0                 scales_1.2.1               
 [87] memoise_2.0.1               magrittr_2.0.3             
 [89] plyr_1.8.8                  ica_1.0-3                  
 [91] zlibbioc_1.44.0             compiler_4.2.3             
 [93] BiocIO_1.8.0                RColorBrewer_1.1-3         
 [95] fitdistrplus_1.1-8          Rsamtools_2.14.0           
 [97] cli_3.6.1                   listenv_0.9.0              
 [99] patchwork_1.1.2             pbapply_1.7-0              
[101] MASS_7.3-58.3               tidyselect_1.2.0           
[103] stringi_1.7.12              yaml_2.3.7                 
[105] ggrepel_0.9.3               grid_4.2.3                 
[107] fastmatch_1.1-3             tools_4.2.3                
[109] timechange_0.2.0            future.apply_1.10.0        
[111] uuid_1.1-0                  TFMPvalue_0.0.9            
[113] gridExtra_2.3               farver_2.1.1               
[115] Rtsne_0.16                  ggraph_2.1.0               
[117] digest_0.6.31               shiny_1.7.4                
[119] pracma_2.4.2                Rcpp_1.0.10                
[121] later_1.3.0                 RcppAnnoy_0.0.20           
[123] httr_1.4.5                  colorspace_2.1-0           
[125] XML_3.99-0.14               tensor_1.5                 
[127] reticulate_1.28             splines_4.2.3              
[129] uwot_0.1.14                 RcppRoll_0.3.0             
[131] spatstat.utils_3.0-2        graphlayouts_0.8.4         
[133] sp_1.6-0                    mapproj_1.2.11             
[135] plotly_4.10.1               xtable_1.8-4               
[137] jsonlite_1.8.4              poweRlaw_0.70.6            
[139] tidygraph_1.2.3             R6_2.5.1                   
[141] pillar_1.9.0                htmltools_0.5.5            
[143] mime_0.12                   glue_1.6.2                 
[145] fastmap_1.1.1               BiocParallel_1.32.6        
[147] codetools_0.2-19            maps_3.4.1                 
[149] utf8_1.2.3                  lattice_0.20-45            
[151] spatstat.sparse_3.0-1       curl_5.0.0                 
[153] leiden_0.4.3                gtools_3.9.4               
[155] GO.db_3.16.0                survival_3.5-3             
[157] repr_1.1.6                  munsell_0.5.0              
[159] GenomeInfoDbData_1.2.9      reshape2_1.4.4             
[161] gtable_0.3.3               

Error Messages:


Preparing model input

Fitting models for 1789 target genes

Error in {: task 2 failed - "ℹ In index: 1.
Caused by error in `MatrixGenerics:::.load_next_suggested_package_to_search()`:
! Failed to find a colMaxs() method for tbl_df objects.Failed to find a colMaxs() method for tbl objects.Failed to find a colMaxs() method for data.frame objects."
Traceback:

1. infer_grn(sobj, peak_to_gene_method = "Signac", upstream = 1e+06, 
 .     downstream = 1e+06, method = "xgb", tf_cor = 0, scale = TRUE, 
 .     interaction_term = "*", parallel = T)
2. infer_grn.SeuratPlus(sobj, peak_to_gene_method = "Signac", upstream = 1e+06, 
 .     downstream = 1e+06, method = "xgb", tf_cor = 0, scale = TRUE, 
 .     interaction_term = "*", parallel = T)
3. fit_grn_models(object = object, genes = genes, network_name = network_name, 
 .     peak_to_gene_method = peak_to_gene_method, upstream = upstream, 
 .     downstream = downstream, extend = extend, only_tss = only_tss, 
 .     parallel = parallel, tf_cor = tf_cor, peak_cor = peak_cor, 
 .     aggregate_rna_col = aggregate_rna_col, aggregate_peaks_col = aggregate_peaks_col, 
 .     method = method, alpha = alpha, family = family, interaction_term = interaction_term, 
 .     adjust_method = adjust_method, scale = scale, verbose = verbose, 
 .     ...)
4. fit_grn_models.SeuratPlus(object = object, genes = genes, network_name = network_name, 
 .     peak_to_gene_method = peak_to_gene_method, upstream = upstream, 
 .     downstream = downstream, extend = extend, only_tss = only_tss, 
 .     parallel = parallel, tf_cor = tf_cor, peak_cor = peak_cor, 
 .     aggregate_rna_col = aggregate_rna_col, aggregate_peaks_col = aggregate_peaks_col, 
 .     method = method, alpha = alpha, family = family, interaction_term = interaction_term, 
 .     adjust_method = adjust_method, scale = scale, verbose = verbose, 
 .     ...)
5. map_par(features, function(g) {
 .     if (!g %in% rownames(peaks2gene)) {
 .         log_message("Warning: ", g, " not found in EnsDb", verbose = verbose == 
 .             2)
 .         return()
 .     }
 .     gene_peaks <- as.logical(peaks2gene[g, ])
 .     if (sum(gene_peaks) == 0) {
 .         log_message("Warning: No peaks found near ", g, verbose = verbose == 
 .             2)
 .         return()
 .     }
 .     g_x <- gene_data[gene_groups, g, drop = FALSE]
 .     peak_x <- peak_data[peak_groups, gene_peaks, drop = FALSE]
 .     peak_g_cor <- as(sparse_cor(peak_x, g_x), "generalMatrix")
 .     peak_g_cor[is.na(peak_g_cor)] <- 0
 .     peaks_use <- rownames(peak_g_cor)[abs(peak_g_cor[, 1]) > 
 .         peak_cor]
...
 . }, verbose = verbose, parallel = parallel)
6. foreach::foreach(i = 1:length(x)) %dopar% {
 .     fun(x[[i]])
 . }
7. e$fun(obj, substitute(ex), parent.frame(), e$data)

I have previously used R version 4.1.3 with sparseMatrixStats and MatrixGenerics 1.6.0 but that did not work either. Can anyone help me with this? Thank you all very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants