merenlab / anvio

An analysis and visualization platform for 'omics data
http://merenlab.org/software/anvio
GNU General Public License v3.0
413 stars 142 forks source link

[BUG] pulp v2.8 made API changes that cause errors generating workflow DAG diagrams #2290

Open smdabdoub opened 6 days ago

smdabdoub commented 6 days ago

Short description of the problem

Attempting to generate DAG diagrams with anvi-run-workflow --save-workflow-graph results in an error due to pulp v2.8.0 which installs with anvi'o v8.

anvi'o version

Anvi'o .......................................: marie (v8)
Python .......................................: 3.10.14

Profile database .............................: 38
Contigs database .............................: 21
Pan database .................................: 16
Genome data storage ..........................: 7
Auxiliary data storage .......................: 2
Structure database ...........................: 2
Metabolic modules database ...................: 4
tRNA-seq database ............................: 2

System info

macOS 14.5 and RHEL 7.9

Followed standard install instructions for both operating systems.

Detailed description of the issue

I was following the Scaling up your analysis with workflows tutorial and when running the folllowing command:

anvi-run-workflow -w pangenomics \
                  -c config.json \
                  --save-workflow-graph

I got the following output:

Config Error: Oh no. Anvi'o was trying to generate a DAG output for you, but something must  
              have gone wrong in a step prior. Something tells anvi'o that if you take a look
              at the log file here, you may be able to figure it out:                        
              '/var/folders/lb/w8n568cn2kj17yrpmlp19yn4dgj2mm/T/tmpnhmtcoew'. Sorry! 

The contents of that file were:

# DATE: 28 Jun 24 16:08:12
# CMD LINE: snakemake --snakefile /software/mambaforge/envs/anvio-8/lib/python3.10/site-packages/anvio/workflows/pangenomics/Snakefile --configfile pangenome_config.json --dryrun --quiet --dag
Traceback (most recent call last):
  File "/software/mambaforge/envs/anvio-8/bin/snakemake", line 8, in <module>
    sys.exit(main())
  File "/software/mambaforge/envs/anvio-8/lib/python3.10/site-packages/snakemake/__init__.py", line 2736, in main
    parser = get_argument_parser()
  File "/software/mambaforge/envs/anvio-8/lib/python3.10/site-packages/snakemake/__init__.py", line 1607, in get_argument_parser
    lp_solvers = pulp.list_solvers(onlyAvailable=True)
AttributeError: module 'pulp' has no attribute 'list_solvers'. Did you mean: 'listSolvers'?

Replacing pulp v2.8.0 with 2.7 fixes the error:

mamba install pulp=2.7

I did see in issue #2234 under the Installation section, they had a line specifically installing pulp v2.7, but I haven't seen that as an issue or a notice anywhere on Github or the Anvi'o install page.

I haven't had any issues after the change with the rest of the pangenomics workflow, but I can't comment on any other parts of Anvi'o as to potential issues with installing v2.7.

Thanks!