reiterlab / treeomics

Decrypting somatic mutation patterns to reveal the evolution of cancer
GNU General Public License v3.0
55 stars 15 forks source link

Example 2: Fails (cplex.exceptions.errors.CplexSolverError: CPLEX Error 1233: Numeric entry is "inf".) #27

Open GregorySchwing opened 1 year ago

GregorySchwing commented 1 year ago

I installed treeomics as directed, and it works wonderfully for example 1 and 3. However, example 2 fails with the following error:

$ treeomics -r input/Bashashati2013/Case5_mutant_reads.txt -s input/Bashashati2013/Case5_coverage.txt -e 0.01

The code runs if the error rate is increased to 0.05, though I am interested in generating larger conflict graphs, such as the figure on the github page. Any ideas why it's failing?

OS: Ubuntu 22 Versions: CPLEX 12.10.0.0; conda python 3.6

2022-09-23 10:13:13,265 treeomics:391 INFO: Subclone detection is disabled. 2022-09-23 10:13:13,265 treeomics:394 INFO: Plot generation is enabled. 2022-09-23 10:13:13,265 treeomics:478 INFO: Sequencing data was aligned to reference genome: grch37 2022-09-23 10:13:13,265 treeomics:509 ERROR: Given path to common variants file input/ExAC/ExAC_sites_0_001.csv could not be found! 2022-09-23 10:13:13,265 treeomics.patient:89 INFO: Bayesian inference model: error rate e 0.01, prior weight c0 0.5, max absent vaf 0.05. 2022-09-23 10:13:13,265 treeomics.patient:151 INFO: VarCode is used for mutation effect prediction. 2022-09-23 10:13:13,265 treeomics.utils.data_tables:69 INFO: Header: ['Chromosome', 'Position', 'Change', 'Gene', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'] 2022-09-23 10:13:13,267 treeomics.utils.data_tables:121 INFO: Read 133 entries in file input/Bashashati2013/Case5_mutant_reads.txt. 2022-09-23 10:13:13,267 treeomics.utils.data_tables:69 INFO: Header: ['Chromosome', 'Position', 'Change', 'Gene', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'] 2022-09-23 10:13:13,269 treeomics.utils.data_tables:121 INFO: Read 133 entries in file input/Bashashati2013/Case5_coverage.txt. 2022-09-23 10:13:13,270 treeomics.patient:1095 INFO: 13 variants passed filtering. 2022-09-23 10:13:13,270 treeomics.patient:1098 INFO: 120 variants excluded due to: Minimum coverage of variant was not reached across all samples. 2022-09-23 10:13:13,270 treeomics.patient:359 INFO: 13 variants passed the filtering. 2022-09-23 10:13:13,281 treeomics.patient:1085 INFO: Sample a: median coverage 26081.0, median VAF 0.263. 2022-09-23 10:13:13,282 treeomics.patient:1085 INFO: Sample b: median coverage 24512.0, median VAF 0.232. 2022-09-23 10:13:13,282 treeomics.patient:1085 INFO: Sample c: median coverage 32504.0, median VAF 0.251. 2022-09-23 10:13:13,282 treeomics.patient:1085 INFO: Sample d: median coverage 21033.0, median VAF 0.284. 2022-09-23 10:13:13,282 treeomics.patient:1085 INFO: Sample e: median coverage 28603.0, median VAF 0.165. 2022-09-23 10:13:13,283 treeomics.patient:1085 INFO: Sample f: median coverage 27387.0, median VAF 0.273. 2022-09-23 10:13:13,283 treeomics.patient:1085 INFO: Sample g: median coverage 26115.0, median VAF 0.254. 2022-09-23 10:13:13,283 treeomics.patient:1085 INFO: Sample h: median coverage 2559.0, median VAF 0.083. 2022-09-23 10:13:13,283 treeomics.patient:371 INFO: 8 samples passed filtering. 0 samples have been discarded (). 2022-09-23 10:13:13,296 treeomics.patient:1183 INFO: Identified 8 shared variants in sample a. Estimated purity: 91.9%. 2022-09-23 10:13:13,296 treeomics.patient:1183 INFO: Identified 8 shared variants in sample b. Estimated purity: 89.4%. 2022-09-23 10:13:13,296 treeomics.patient:1183 INFO: Identified 8 shared variants in sample c. Estimated purity: 75.8%. 2022-09-23 10:13:13,297 treeomics.patient:1183 INFO: Identified 8 shared variants in sample d. Estimated purity: 67.7%. 2022-09-23 10:13:13,297 treeomics.patient:1183 INFO: Identified 8 shared variants in sample e. Estimated purity: 47.3%. 2022-09-23 10:13:13,297 treeomics.patient:1183 INFO: Identified 8 shared variants in sample f. Estimated purity: 78.7%. 2022-09-23 10:13:13,297 treeomics.patient:1183 INFO: Identified 8 shared variants in sample g. Estimated purity: 92.9%. 2022-09-23 10:13:13,297 treeomics.patient:1183 INFO: Identified 8 shared variants in sample h. Estimated purity: 23.3%. INFO:pyensembl.sequence_data:Loaded sequence dictionary from /home/greg/.cache/pyensembl/GRCh37/ensembl75/Homo_sapiens.GRCh37.75.cdna.all.fa.gz.pickle INFO:pyensembl.sequence_data:Loaded sequence dictionary from /home/greg/.cache/pyensembl/GRCh37/ensembl75/Homo_sapiens.GRCh37.75.ncrna.fa.gz.pickle 2022-09-23 10:13:13,879 treeomics.patient:491 INFO: 8 samples passed the filtering and have been processed. 2022-09-23 10:13:13,880 treeomics.patient:492 INFO: Completed reading of allele frequencies at 13 mutated positions. 2022-09-23 10:13:13,880 treeomics:78 INFO: Output directory: /home/greg/Documents/output/Case5 2022-09-23 10:13:13,883 treeomics.utils.driver:395 INFO: Read 299 entries in driver list file input/BaileyDing2018_driverconsensus.csv. 2022-09-23 10:13:13,884 treeomics:183 INFO: Excluded Intronic variant found in putative driver CIC (chr 19, pos 47490659). 2022-09-23 10:13:13,884 treeomics:183 INFO: Excluded Intronic variant found in putative driver FUBP1 (chr 1, pos 78201955). 2022-09-23 10:13:13,885 treeomics:234 INFO: Wrote 0 putative driver variants to file: ../output/Case5/Case5_8_putativedrivers 2022-09-23 10:13:13,885 treeomics.utils.analysis:56 INFO: The average number of mutations per sample in patient Case5 is 12.9. 2022-09-23 10:13:13,885 treeomics.utils.data_tables:438 INFO: Wrote 0 substitution variants to VEP input file: ../output/Case5/Case5_8_func_variants_vep.tsv 2022-09-23 10:13:13,885 treeomics.utils.data_tables:470 INFO: Wrote 0 substitution variants to CRAVAT input file: ../output/Case5/Case5_8_func_variants_cravat.tsv 2022-09-23 10:13:13,888 treeomics.utils.analysis:149 INFO: 92.3% (12/13) of all distinct mutations are founders. 2022-09-23 10:13:13,888 treeomics.utils.analysis:153 INFO: In average 0.0 (0.0%) mutations are unique (private) per sample. 2022-09-23 10:13:13,889 treeomics.utils.analysis:211 INFO: Total number of distinct mutation patterns: 2 2022-09-23 10:13:14,525 treeomics.plots.plots_utils:196 INFO: Generated bayesian mutation table plot: Case5_8_e=0_01_c0=0_5_af=0_05_bayesian_data_table.pdf 2022-09-23 10:13:16,151 treeomics.phylogeny.max_lh_phylogeny:129 INFO: Minimum reliability score value to be considered as a potential subclone: 2.404e-02 2022-09-23 10:13:16,221 treeomics.phylogeny.max_lh_phylogeny:750 INFO: Created conflict graph with 247 nodes of weight 4.73 and 23310 evolutionary conflicts. 2022-09-23 10:13:16,222 treeomics.phylogeny.cplex_solver:42 INFO: Build linear program (cplex) for finding the minimal number of conflicting mutations. CPLEX Error 1233: Numeric entry is "inf". Traceback (most recent call last): File "/home/greg/anaconda3/envs/treeomics/bin/treeomics", line 33, in sys.exit(load_entry_point('treeomics', 'console_scripts', 'treeomics')()) File "/home/greg/Documents/treeomics/treeomics/main.py", line 770, in main tikztrees=args.tikztrees, variant_filepath=os.path.join(output_directory, fn_tree+'_variants.csv')) File "/home/greg/Documents/treeomics/treeomics/tree_inference.py", line 55, in create_max_lh_tree no_bootstrap_samples=no_bootstrap_samples) File "/home/greg/Documents/treeomics/treeomics/phylogeny/max_lh_phylogeny.py", line 186, in infer_max_lh_tree time_limit=time_limit, n_max_threads=n_max_threads) File "/home/greg/Documents/treeomics/treeomics/phylogeny/cplex_solver.py", line 82, in solve_conflicting_phylogeny lp.variables.add(obj=scaled_obj_func, types=ctypes, names=cnames) File "/home/greg/anaconda3/envs/treeomics/lib/python3.6/site-packages/cplex/_internal/_subinterfaces.py", line 456, in add obj, lb, ub, types, names, columns) File "/home/greg/anaconda3/envs/treeomics/lib/python3.6/site-packages/cplex/_internal/_baseinterface.py", line 41, in _add_iter addfun(*args, **kwargs) File "/home/greg/anaconda3/envs/treeomics/lib/python3.6/site-packages/cplex/_internal/_subinterfaces.py", line 378, in _add types, names) File "/home/greg/anaconda3/envs/treeomics/lib/python3.6/site-packages/cplex/_internal/_procedural.py", line 968, in newcols check_status(env, status) File "/home/greg/anaconda3/envs/treeomics/lib/python3.6/site-packages/cplex/_internal/_procedural.py", line 236, in call raise CplexSolverError(error_string, env, status) cplex.exceptions.errors.CplexSolverError: CPLEX Error 1233: Numeric entry is "inf".

kunstner commented 1 year ago

Same issue here. Any idea how to fix this?