mskilab-org / JaBbA

MIP based joint inference of copy number and rearrangement state in cancer whole genome sequence data.
MIT License
56 stars 25 forks source link

Error running test example #92

Closed p-smirnov closed 11 months ago

p-smirnov commented 1 year ago

Describe the bug It seems I have successfully installed JaBbA, but I am having trouble running the test example. In particular, when I run the code, I am getting an error back from CPLEX. The R error is:

Starting optimization with CPLEX!
Error in names(x) <- c("xopt", "obj", "status", "extra", "epgap") :
  'names' attribute [5] must be the same length as the vector [1]

This occurs because CPLEX is returning a CPXERR_BOUNDS_INFEAS error (CODE 1100) instead of a solution.

Here is the full output of JaBbA:

JaBbA 2023-06-26 16:43:05: Located junction file ****/R/x86_64-pc-linux-gnu-library/4.1/JaBbA/extdata//junctions.vcf
JaBbA 2023-06-26 16:43:05: Located coverage file ****/R/x86_64-pc-linux-gnu-library/4.1/JaBbA/extdata//coverage.txt
JaBbA 2023-06-26 16:43:05: Loading packages ...
JaBbA 2023-06-26 16:43:05: Starting analysis in /home/***/jabba_test
JaBbA 2023-06-26 16:43:07: Read in 83 total input junctions
JaBbA 2023-06-26 16:43:07: In the input, There are 0 tier 1 junctions; 83 tier 2 junctions; 0 tier 3 junctions.
JaBbA 2023-06-26 16:43:07: Read in 1,805 1000bp bins of coverage data across 1 chromosomes
JaBbA 2023-06-26 16:43:07: Using previous segmentation found in jabba directory
JaBbA 2023-06-26 16:43:07: Loaded 83 junctions from the input.
JaBbA 2023-06-26 16:43:08: Found tier field enforcing >=1 CN at 0 junctions
JaBbA 2023-06-26 16:43:08: Removing 0 tier 3 junctions
JaBbA 2023-06-26 16:43:08: 69 INDEL-like isolated events
JaBbA 2023-06-26 16:43:08: 69 INDEL-like isolated junctions mandatorily EXCLUDED in the final model
JaBbA 2023-06-26 16:43:09: Conform the reference sequence length of: seg, coverage, and ra, to be:
    12:100746000
    16:90354753
    19:59128983
JaBbA 2023-06-26 16:43:09: Number of gaps with nonzero width: 6
JaBbA 2023-06-26 16:43:09: Number of segments before gap filtering: 19
JaBbA 2023-06-26 16:43:10: 13 segments produced after gap filtering
JaBbA 2023-06-26 16:43:12: Brand new function for reciprocal junctions calling.
.
JaBbA 2023-06-26 16:43:13: Excluding 14 aberrant junctions whose both breakpoints are in NA coverage regions
JaBbA 2023-06-26 16:43:13: Cancel nudge for 0 aberrant junctions where one of the 2 breakpoint is in NA coverage regions
JaBbA 2023-06-26 16:43:13: In sum, we are forcing 0 junctions, excluding 14 junctions, and nudging 0 junctions
JaBbA 2023-06-26 16:43:13: number of specified max.threads: 12
JaBbA 2023-06-26 16:43:13: number of specified max.threads after processing: 12
JaBbA 2023-06-26 16:43:13: param.file contents:
CPLEX Parameter File Version 12.10.0.0
CPXPARAM_Threads    12
CPXPARAM_MIP_Limits_TreeMemory  16384
CPXPARAM_WorkMem    9830
JaBbA 2023-06-26 16:43:14: Creating ILOG CPLEX PARAMETER FILE in /home/***/jabba_test/jabba.raw.rds.prm
JaBbA 2023-06-26 16:43:14: Excluding aberrant junctions: 1,2,3,4,5,6,7,8,9,10,11,12,13,14
JaBbA 2023-06-26 16:43:14: Using existing mipstart in the current directory
JaBbA 2023-06-26 16:43:14: Applying mipstarts from previous jabba solution
reading karyograph from file
Marking nodes with cn contained in column: cnmle
Computing node weights using variance contained in column: loess.var
Rewards not supplied on edges!
Starting LP balance on gGraph with...
Number of nodes: 41
Number of edges: 52
detected no tier 1 junctions
No duplicate Tier 1 junctions detected
Grabbing available memory...
Currently used: 669.7 Mb
Allowed: 16000 Mb
Treemem: 14330.3 Mb
creating copy of input gGraph
Checking inputs
adding l0 penalty indicator
adding delta constraints for LP
Unique cids (A): 979
Unique cids (b): 979
Number of variables: 1072
bvec length: 979
Amat nrow: 979
Starting optimization with CPLEX!
Error in names(x) <- c("xopt", "obj", "status", "extra", "epgap") :
  'names' attribute [5] must be the same length as the vector [1]

Could someone who is able to successfully run the test case let me know what the expected output is? It would help with understanding what is going wrong.

To Reproduce I am following the instructions to run the test case.

Desktop (please complete the following information): Here is my R sessionInfo for when the error occurs:

R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblas-r0.3.3.so

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

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

other attached packages:
 [1] JaBbA_0.0.0.9000     gGnome_0.1           reshape2_1.4.4
 [4] Matrix_1.3-4         igraph_1.5.0         gTrack_0.1.0
 [7] gUtils_0.2.0         data.table_1.14.8    GenomicRanges_1.44.0
[10] GenomeInfoDb_1.28.4  IRanges_2.26.0       S4Vectors_0.30.2
[13] BiocGenerics_0.38.0  optparse_1.7.3

loaded via a namespace (and not attached):
  [1] bitops_1.0-7                matrixStats_1.0.0
  [3] bit64_4.0.5                 filelock_1.0.2
  [5] progress_1.2.2              httr_1.4.2
  [7] tools_4.1.0                 utf8_1.2.1
  [9] R6_2.5.0                    KernSmooth_2.23-20
 [11] DBI_1.1.3                   lazyeval_0.2.2
 [13] colorspace_2.1-0            DNAcopy_1.66.0
 [15] tidyselect_1.2.0            prettyunits_1.1.1
 [17] bit_4.0.5                   curl_4.3.2
 [19] compiler_4.1.0              iotools_0.3-2
 [21] cli_3.6.1                   Biobase_2.52.0
 [23] xml2_1.3.2                  DelayedArray_0.18.0
 [25] plotly_4.10.2               rtracklayer_1.52.1
 [27] caTools_1.18.2              scales_1.2.1
 [29] readr_2.1.4                 pbapply_1.7-0
 [31] rappdirs_0.3.3              stringr_1.5.0
 [33] digest_0.6.27               Rsamtools_2.8.0
 [35] XVector_0.32.0              pkgconfig_2.0.3
 [37] htmltools_0.5.5             MatrixGenerics_1.4.3
 [39] BSgenome_1.60.0             dbplyr_2.3.2
 [41] fastmap_1.1.0               htmlwidgets_1.6.2
 [43] rlang_1.1.1                 rstudioapi_0.13
 [45] RSQLite_2.3.1               sequenza_3.0.0
 [47] BiocIO_1.2.0                generics_0.1.3
 [49] zoo_1.8-12                  jsonlite_1.7.2
 [51] gtools_3.9.4                BiocParallel_1.26.2
 [53] dplyr_1.1.2                 VariantAnnotation_1.38.0
 [55] RCurl_1.98-1.12             magrittr_2.0.1
 [57] GenomeInfoDbData_1.2.6      fishHook_0.1
 [59] Rcpp_1.0.6                  munsell_0.5.0
 [61] fansi_0.5.0                 lifecycle_1.0.3
 [63] stringi_1.6.2               yaml_2.2.1
 [65] SummarizedExperiment_1.22.0 zlibbioc_1.38.0
 [67] gplots_3.1.3                plyr_1.8.8
 [69] BiocFileCache_2.0.0         grid_4.1.0
 [71] blob_1.2.4                  crayon_1.4.1
 [73] lattice_0.20-44             Biostrings_2.60.2
 [75] GenomicFeatures_1.44.2      hms_1.1.3
 [77] KEGGREST_1.32.0             seqminer_8.9
 [79] pillar_1.9.0                rjson_0.2.21
 [81] biomaRt_2.48.3              XML_3.99-0.14
 [83] glue_1.6.2                  squash_1.0.9
 [85] copynumber_1.32.0           tzdb_0.4.0
 [87] vctrs_0.6.3                 png_0.1-8
 [89] gtable_0.3.3                getopt_1.20.3
 [91] purrr_1.0.1                 tidyr_1.3.0
 [93] cachem_1.0.5                ggplot2_3.4.2
 [95] restfulr_0.0.15             viridisLite_0.4.2
 [97] tibble_3.2.1                GenomicAlignments_1.28.0
 [99] AnnotationDbi_1.54.1        memoise_2.0.1
shihabdider commented 11 months ago

This is likely an issue with not installing CPLEX with the installation of gGnome. 26e9102099990c90304d75c051573609e55c4bf3 adds an informative error message and automatically reinstalls gGnome to fix this error.

Also see this (newly added) section in the readme:

WARNING : JaBbA uses some functions from gGnome package as a wrapper that needsCPLEX functionality to be added to gGnome. If the dependency package gGnome was installed before installing JaBbA or if CPLEX functionality was not added while installing gGnome or if you get an error while running JaBbA as shown below:

Error in names(x) <- c("xopt", "obj", "status", "extra", "epgap") :
  'names' attribute [5] must be the same length as the vector [1]
Error in .C("Rcplex_free", PACKAGE = "gGnome") :
  "Rcplex_free" not available for .C() for package "gGnome"

This means gGnome was installed without CPLEX functionality. Currently, JaBbA checks if gGnome has CPLEX functionality added while installing and loading the JaBbA package, if not, it will reinstall gGnome to add the CPLEX functionality, so it should take some time for applying this optimization during installation.