popsim-consortium / analysis2

Analysis for the second consortium paper.
8 stars 14 forks source link

Error when plotting in rule n_t_all_plot #90

Closed igronau closed 1 year ago

igronau commented 1 year ago

When running the analysis2 pipieline using tiny_config, I get the error message below when rule n_t_all_plot is applied:

ERROR:snakemake.logging:Error in rule n_t_all_plot: . . . RuleException: TypeError in file /home/igronau/projects/popsim/analysis2/workflows/n_t.snake, line 591: FigureCanvasPdf.print_pdf() got an unexpected keyword argument 'alpha' File "/home/igronau/projects/popsim/analysis2/workflows/n_t.snake", line 591, in __rule_all_plot File "/home/igronau/projects/popsim/analysis2/workflows/plots.py", line 172, in plot_all_ne_estimates File "/home/igronau/anaconda3/envs/analysis2/lib/python3.10/site-packages/matplotlib/figure.py", line 3285, in savefig File "/home/igronau/anaconda3/envs/analysis2/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 2338, in print_figure File "/home/igronau/anaconda3/envs/analysis2/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 2204, in File "/home/igronau/anaconda3/envs/analysis2/lib/python3.10/concurrent/futures/thread.py", line 58, in run

The error appears to be triggered by line 172 in function plot_all_ne_estimates in plots.py:

f.savefig(outfile, bbox_inches='tight', alpha=0.8)

Apparently, function savefig does not accept an alpha argument.

andrewkern commented 1 year ago

guessing this is a requirement version issue? did you recreate your conda env before running the newest version?

igronau commented 1 year ago

I downloaded the analysis2 code last week. I see that you made some changes and fixes. I'll pull the latest version and try (and will rebuild the conda env).

igronau commented 1 year ago

This works fine after pulling the newest version from Thursday. Thanks @andrewkern