jts / sga

de novo sequence assembler using string graphs
http://genome.cshlp.org/content/22/3/549
237 stars 82 forks source link

Invalid arguments to legend in sga-preqc-report.py #105

Closed avilella closed 8 years ago

avilella commented 8 years ago

I am running it with the attached input file, and get the following error below. This is from a single-end fastq dataset:

/data/home/user/.local/lib/python2.7/site-packages/matplotlib/axes/_base.py:2767: UserWarning: Attempting to set identical left==right results
in singular transformations; automatically expanding.
left=0, right=0
  'left=%s, right=%s') % (left, right))
Traceback (most recent call last):
  File "/data/home/user/sga/src/bin/sga-preqc-report.py", line 868, in <module>
    sys.exit(main(argv=None))
  File "/data/home/user/sga/src/bin/sga-preqc-report.py", line 99, in main
    save_png=args.png, pylab_show=args.show)
  File "/data/home/user/sga/src/bin/sga-preqc-report.py", line 762, in make_report_with_subplots
    plot_legend(subplots[2][0], data)
  File "/data/home/user/sga/src/bin/sga-preqc-report.py", line 331, in plot_legend
    ax.legend(proxy_arts, names, 2, bbox_to_anchor=(0,1), borderaxespad=0.)
  File "/data/home/user/.local/lib/python2.7/site-packages/matplotlib/axes/_axes.py", line 536, in legend
    raise TypeError('Invalid arguments to legend.')
TypeError: Invalid arguments to legend.

sga.r1.preqc.txt

ljdursi commented 8 years ago

I believe this was fixed by https://github.com/jts/sga/commit/a7c5d495e0558f827539a1bad98ed0f9ae22fb9d ; Matplotlib 1.5 changed the loc argument to legend from a positional to a keyword argument. Can you try the latest version (or just change 2 to loc=2 in that line)?

avilella commented 8 years ago

Brilliant! I got it to work. Can close ticket. Thx

On Tue, Jan 19, 2016 at 1:33 PM, Jonathan Dursi notifications@github.com wrote:

I believe this was fixed by a7c5d49 https://github.com/jts/sga/commit/a7c5d495e0558f827539a1bad98ed0f9ae22fb9d ; Matplotlib 1.5 changed the loc argument to legend from a positional to a keyword argument. Can you try the latest version (or just change 2 to loc=2 in that line)?

— Reply to this email directly or view it on GitHub https://github.com/jts/sga/issues/105#issuecomment-172854712.