PoisonAlien / maftools

Summarize, Analyze and Visualize MAF files from TCGA or in-house studies.
http://bioconductor.org/packages/release/bioc/html/maftools.html
MIT License
443 stars 218 forks source link

cannot use trinucleotideMatrix function: error in .Call2 #1000

Closed thscandolara closed 9 months ago

thscandolara commented 9 months ago

Hello. I want to extract mutational signatures from a dataset, however, I am facing some problems regarding the 'trinucleotideMatrix' function. I already tried to indicate in ref_genome as 'BSgenome.Hsapiens.UCSC.hg19' and had the same error return. Do you have any idea how can I fix this?

x <- trinucleotideMatrix(maf = maf_filtered,
                         ref_genome = NULL,
                         prefix = NULL,
                         add = TRUE,
                         ignoreChr = NULL,
                         useSyn = TRUE,
                         fn = NULL)

-Found following BSgenome installtions. Using first entry
                       pkgname organism provider genome masked
1: BSgenome.Hsapiens.UCSC.hg19 Hsapiens     UCSC   hg19  FALSE
-Extracting 5' and 3' adjacent bases
Error in .Call2("C_solve_user_SEW", refwidths, start, end, width, translate.negative.coord,  : 
  solving row 514: 'allow.nonnarrowing' is FALSE and the supplied start (81597297) is > refwidth + 1

Session info

R version 4.2.2 (2022-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS:   /data00/TOOLS/R/R-4.2.2/lib64/R/lib/libRblas.so
LAPACK: /data00/TOOLS/R/R-4.2.2/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               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    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] BSgenome.Hsapiens.UCSC.hg19_1.4.3                   BSgenome_1.66.3                                    
 [3] rtracklayer_1.58.0                                  mutSignatures_2.1.1                                
 [5] maftools_2.14.0                                     sesame_1.16.1                                      
 [7] sesameData_1.16.0                                   ExperimentHub_2.6.0                                
 [9] TCGAbiolinks_2.25.3                                 gplots_3.1.3                                       
[11] VennDiagram_1.7.3                                   EnhancedVolcano_1.16.0                             
[13] ggrepel_0.9.4                                       org.Hs.eg.db_3.16.0                                
[15] AnnotationDbi_1.60.2                                clusterProfiler_4.6.2                              
[17] enrichplot_1.18.4                                   biomaRt_2.54.1                                     
[19] AnnotationHub_3.6.0                                 BiocFileCache_2.11.1                               
[21] dbplyr_2.4.0                                        lubridate_1.9.3                                    
[23] forcats_1.0.0                                       stringr_1.5.1                                      
[25] purrr_1.0.2                                         readr_2.1.4                                        
[27] tidyr_1.3.0                                         tibble_3.2.1                                       
[29] tidyverse_2.0.0                                     DEGreport_1.34.0                                   
[31] edgeR_3.40.2                                        limma_3.54.2                                       
[33] Glimma_2.8.0                                        reshape2_1.4.4                                     
[35] pheatmap_1.0.12                                     apeglm_1.20.0                                      
[37] DESeq2_1.38.3                                       EpiDISH_2.14.1                                     
[39] BiocManager_1.30.22                                 FlowSorted.Blood.450k_1.36.0                       
[41] rafalib_1.0.2                                       IlluminaHumanMethylation450kmanifest_0.4.0         
[43] methylDeConv_0.1.1                                  MVisAGe_0.2.1                                      
[45] missMethyl_1.32.1                                   IlluminaHumanMethylationEPICanno.ilm10b4.hg19_0.6.0
[47] IlluminaHumanMethylation450kanno.ilmn12.hg19_0.6.1  svglite_2.1.3                                      
[49] survminer_0.4.9                                     ggpubr_0.6.0                                       
[51] survival_3.5-7                                      viridis_0.6.4                                      
[53] viridisLite_0.4.2                                   dplyr_1.1.4                                        
[55] ggplot2_3.4.4                                       methylclock_1.4.0                                  
[57] quadprog_1.5-8                                      devtools_2.4.5                                     
[59] usethis_2.2.2                                       methylclockData_1.6.0                              
[61] RColorBrewer_1.1-3                                  ChAMP_2.28.0                                       
[63] RPMM_1.25                                           cluster_2.1.6                                      
[65] DT_0.31                                             IlluminaHumanMethylationEPICmanifest_0.3.0         
[67] Illumina450ProbeVariants.db_1.34.0                  DMRcate_2.12.0                                     
[69] ChAMPdata_2.30.0                                    minfi_1.44.0                                       
[71] bumphunter_1.40.0                                   locfit_1.5-9.8                                     
[73] iterators_1.0.14                                    foreach_1.5.2                                      
[75] Biostrings_2.66.0                                   XVector_0.38.0                                     
[77] SummarizedExperiment_1.28.0                         Biobase_2.58.0                                     
[79] MatrixGenerics_1.10.0                               matrixStats_1.2.0                                  
[81] GenomicRanges_1.50.2                                GenomeInfoDb_1.34.9                                
[83] IRanges_2.32.0                                      S4Vectors_0.36.2                                   
[85] BiocGenerics_0.44.0                                 futile.logger_1.4.3                                

loaded via a namespace (and not attached):
  [1] graphlayouts_1.0.2            lattice_0.22-5                vctrs_0.6.5                  
  [4] fastICA_1.2-4                 mgcv_1.9-1                    beanplot_1.3.1               
  [7] DSS_2.46.0                    blob_1.2.4                    RBGL_1.74.0                  
 [10] later_1.3.2                   DBI_1.2.0                     R.utils_2.12.3               
 [13] rappdirs_0.3.3                jpeg_0.1-10                   zlibbioc_1.44.0              
 [16] MatrixModels_0.5-3            OrganismDbi_1.40.0            GlobalOptions_0.1.2          
 [19] htmlwidgets_1.6.4             mvtnorm_1.2-4                 tidygraph_1.3.0              
 [22] illuminaio_0.40.0             logging_0.10-108              Rcpp_1.0.11                  
 [25] KernSmooth_2.23-22            promises_1.2.1                DelayedArray_0.24.0          
 [28] methylumi_2.44.0              pkgload_1.3.3                 locfdr_1.1-8                 
 [31] graph_1.76.0                  Hmisc_5.1-1                   geneLenDataBase_1.34.0       
 [34] fs_1.6.3                      fastmatch_1.1-4               mnormt_2.1.1                 
 [37] digest_0.6.33                 png_0.1-8                     nor1mix_1.3-2                
 [40] scatterpie_0.2.1              DOSE_3.24.2                   cowplot_1.1.2                
 [43] nleqslv_3.3.5                 ggraph_2.1.0                  pkgconfig_2.0.3              
 [46] GO.db_3.16.0                  DelayedMatrixStats_1.20.0     emdbook_1.3.13               
 [49] circlize_0.4.15               GetoptLong_1.0.5              xfun_0.41                    
 [52] zoo_1.8-12                    tidyselect_1.2.0              DNAcopy_1.72.3               
 [55] gson_0.1.0                    marray_1.76.0                 pkgbuild_1.4.3               
 [58] rlang_1.1.2                   BiocCheck_1.34.3              glue_1.6.2                   
 [61] ensembldb_2.22.0              lambda.r_1.2.4                sva_3.46.0                   
 [64] ggsignif_0.6.4                ExperimentHubData_1.24.0      SparseM_1.81                 
 [67] httpuv_1.6.13                 class_7.3-22                  preprocessCore_1.60.2        
 [70] PerformanceAnalytics_2.0.4    isva_1.9                      annotate_1.76.0              
 [73] bsseq_1.34.0                  jsonlite_1.8.8                ROC_1.74.0                   
 [76] bit_4.0.5                     mime_0.12                     systemfonts_1.0.5            
 [79] gridExtra_2.3                 Rsamtools_2.14.0              ConsensusClusterPlus_1.62.0  
 [82] stringi_1.8.3                 TCGAbiolinksGUI.data_1.18.0   wateRmelon_2.4.0             
 [85] yulab.utils_0.1.2             bitops_1.0-7                  cli_3.6.2                    
 [88] rhdf5filters_1.10.1           RSQLite_2.3.4                 data.table_1.14.10           
 [91] timechange_0.2.0              rstudioapi_0.15.0             GenomicAlignments_1.34.1     
 [94] nlme_3.1-164                  qvalue_2.30.0                 VariantAnnotation_1.44.1     
 [97] miniUI_0.1.1.1                gridGraphics_0.5-1            survMisc_0.5.6               
[100] R.oo_1.25.0                   urlchecker_1.0.1              sessioninfo_1.2.2            
[103] lifecycle_1.0.4               munsell_0.5.0                 R.methodsS3_1.8.2            
[106] caTools_1.18.2                codetools_0.2-19              coda_0.19-4                  
[109] htmlTable_2.4.2               ggpp_0.5.5                    xtable_1.8-4                 
[112] ggpmisc_0.5.5                 formatR_1.14                  abind_1.4-5                  
[115] farver_2.1.1                  km.ci_0.5-6                   aplot_0.2.2                  
[118] askpass_1.2.0                 biovizBase_1.46.0             ggtree_3.6.2                 
[121] BiocIO_1.8.0                  GEOquery_2.66.0               patchwork_1.1.3              
[124] shinythemes_1.2.0             ggdendro_0.1.23               futile.options_1.0.1         
[127] profvis_0.3.8                 dichromat_2.0-0.1             dendextend_1.17.1            
[130] tidytree_0.4.6                Matrix_1.6-4                  ellipsis_0.3.2               
[133] prettyunits_1.2.0             goseq_1.50.0                  mclust_6.0.1                 
[136] igraph_1.6.0                  multtest_2.54.0               fgsea_1.24.0                 
[139] remotes_2.4.2.1               htmltools_0.5.7               yaml_2.3.8                   
[142] GenomicFeatures_1.50.4        utf8_1.2.4                    plotly_4.10.3                
[145] interactiveDisplayBase_1.36.0 XML_3.99-0.16                 e1071_1.7-14                 
[148] foreign_0.8-86                withr_2.5.2                   BiocParallel_1.32.6          
[151] bit64_4.0.5                   BiasedUrn_2.0.11              rngtools_1.5.2               
[154] doRNG_1.8.6                   affyio_1.68.0                 ProtGenerics_1.30.0          
[157] GOSemSim_2.24.0               combinat_0.0-8                AnnotationHubData_1.28.0     
[160] memoise_2.0.1                 evaluate_0.23                 globaltest_5.52.1            
[163] geneplotter_1.76.0            tzdb_0.4.0                    permute_0.9-7                
[166] curl_5.2.0                    RUnit_0.4.32                  fansi_1.0.6                  
[169] xts_0.13.1                    polynom_1.4-1                 checkmate_2.3.1              
[172] cachem_1.0.8                  Gviz_1.42.1                   HDO.db_0.99.1                
[175] interp_1.1-5                  deldir_2.0-2                  impute_1.72.3                
[178] rjson_0.2.21                  rstatix_0.7.2                 lumi_2.50.0                  
[181] clue_0.3-65                   tools_4.2.2                   magrittr_2.0.3               
[184] RCurl_1.98-1.13               proxy_0.4-27                  ape_5.7-1                    
[187] car_3.1-2                     ggplotify_0.1.2               xml2_1.3.6                   
[190] httr_1.4.7                    rmarkdown_2.25                R6_2.5.1                     
[193] Rhdf5lib_1.20.0               AnnotationFilter_1.22.0       nnet_7.3-19                  
[196] treeio_1.22.0                 progress_1.2.3                genefilter_1.80.3            
[199] KEGGREST_1.38.0               stringdist_0.9.12             shape_1.4.6                  
[202] gtools_3.9.5                  statmod_1.5.0                 BiocVersion_3.16.0           
[205] HDF5Array_1.26.0              rhdf5_2.42.1                  splines_4.2.2                
[208] carData_3.0-5                 ggfun_0.1.3                   colorspace_2.1-0             
[211] generics_0.1.3                base64enc_0.1-3               pracma_2.4.4                 
[214] pillar_1.9.0                  tweenr_2.0.2                  affy_1.76.0                  
[217] GenomeInfoDbData_1.2.9        plyr_1.8.9                    wheatmap_0.2.0               
[220] gtable_0.3.4                  rvest_1.0.3                   bdsmatrix_1.3-6              
[223] psych_2.3.12                  restfulr_0.0.15               biocViews_1.66.3             
[226] ComplexHeatmap_2.14.0         knitr_1.45                    latticeExtra_0.6-30          
[229] shadowtext_0.1.2              fastmap_1.1.1                 doParallel_1.0.17            
[232] quantreg_5.97                 broom_1.0.5                   openssl_2.1.1                
[235] scales_1.3.0                  filelock_1.0.3                backports_1.4.1              
[238] base64_2.0.1                  kpmt_0.1.0                    ggforce_0.4.1                
[241] hms_1.1.3                     scrime_1.3.5                  shiny_1.8.0                  
[244] KMsurv_0.1-5                  polyclip_1.10-6               numDeriv_2016.8-1.1          
[247] bbmle_1.0.25.1                siggenes_1.72.0               lazyeval_0.2.2               
[250] dynamicTreeCut_1.63-1         Formula_1.2-5                 JADE_2.0-4                   
[253] crayon_1.5.2                  MASS_7.3-60                   downloader_0.4               
[256] sparseMatrixStats_1.10.0      reshape_0.8.9                 AnnotationForge_1.40.2       
[259] rpart_4.1.23                  compiler_4.2.2    
PoisonAlien commented 9 months ago

Hi,

I think this is the issue with the wrong ref build. Are you sure your variants are called with hg19?

thscandolara commented 9 months ago

Oh, wow. Such a mistake on my part. That worked! Many thanks!!!