Skip to content

Commit de24a5d

Browse files
committed
Handle missing gap parameter for infeasible SCIP solutions
1 parent 7bf1ebf commit de24a5d

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CoRAL - Complete Reconstruction of Amplifications with Long reads
22
## Reference
3-
CoRAL is a tool which utilizes aligned, single-molecule long-read data (.bam) as input, and identifies candidate ecDNA structures. The original Genome Research '24 paper is available here: https://genome.cshlp.org/content/34/9/1344.
3+
CoRAL is a tool which utilizes aligned, single-molecule long-read data (.bam) as input, and identifies candidate ecDNA structures. The original Genome Research '24 paper is available here: https://genome.cshlp.org/content/34/9/1344, and used CoRAL v1.0.0.
44

55
- **CoRAL only works on long-read
66
whole-genome sequencing data (PacBio, Oxford Nanopore, etc.) - not targeted

coral/models/cycle_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@ def solve(
288288
# keepfiles=True,
289289
# load_solutions=True,
290290
)
291+
# Infeasible SCIP solutions sometimes don't populate gap attribute
292+
if not hasattr(results.solver, "gap"):
293+
results.solver.gap = None
294+
291295
# We potentially need to load because the Pyomo flag will delete the
292296
# solver results object, which we need to extract MIP Gap
293297
# information for certain solvers where the Pyomo log-parsing fails.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ license = "MIT"
2121
name = "CoRAL"
2222
readme = 'README.md'
2323
repository = "https://github.com/AmpliconSuite/CoRAL"
24-
version = "2.2.0"
24+
version = "2.2.1"
2525

2626
packages = [{ include = "coral" }]
2727

0 commit comments

Comments
 (0)