iqbal-lab-org / pling

Plasmid analysis using rearrangement distances
MIT License
28 stars 1 forks source link

Adding GLPK as default solver and other misc improvements #16

Closed leoisl closed 12 months ago

leoisl commented 12 months ago

The main improvement of this PR is to add GLPK as the default solver. This new option was added to run_pling.py:

  --ilp_solver {GLPK,gurobi}
                        ILP solver to use. Default is GLPK, which is slower but is bundled with pling and is free. If using gurobi, make sure you have a valid license and gurobi_cl is in your PATH.

GLPK is conda installable and snakemake installs it automatically if the user chooses to use it. User still has the option to use gurobi, but then they have to perform the installation and licensing steps.

Some other miscellaneous improvements were required to add GLPK:

  1. A small test infrastructure (tests dir) that contains a single unit test for now that checks if the script that converts the GLPK output to gurobi output is working correctly. I saw that there are some scattered tests in the scripts in the repo, they should then all be collected in this dir. Most of the added lines in this PR (3425 out of 3579) are the input/output files of this unit test;
  2. Some fixes to the conda envs;
  3. Using the pip dingII now instead of the hard-coded path /home/daria/Documents/projects/Murray_Family/ding/dingiiofficial;
  4. Misc stuff: adding .gitignore, shadowing a rule, capturing logs of some rules, etc

Closes #14