tanghaibao / jcvi

Python library to facilitate genome assembly, annotation, and comparative genomics
BSD 2-Clause "Simplified" License
738 stars 187 forks source link

plotall error #47

Closed StefanoLonardi closed 7 years ago

StefanoLonardi commented 7 years ago

Hi, I have used ALLMAPS many times, but this is the first time I use 11 genetic maps. The commands python -m jcvi.assembly.allmaps merge ... and python -m jcvi.assembly.allmaps path ... conclude fine, but when I run

stelo@H4:~/ALLMAPS_in_progress$ python -m jcvi.assembly.allmaps plotall map.bed --figsize=12x8 --dpi=600 --format=eps
16:59:38 [base] Load file `map.agp`
16:59:38 [base] Load file `map.lifted.bed`
16:59:42 [allmaps] Map contains 169097 markers in 121 linkage groups.
16:59:46 [base] Load file `weights.txt`
16:59:46 [base] Imported 11 records from `weights.txt`.
16:59:46 [allmaps] Map weights: [('CI', 1), ('WC', 1), ('27I', 1), ('LL', 1), ('TI', 1), ('SV', 1), ('NF', 1), ('5I', 1), ('CB', 1), ('Y5', 1), ('46B', 1)]
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/jcvi/assembly/allmaps.py", line 1684, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/jcvi/assembly/allmaps.py", line 820, in main
    p.dispatch(globals())
  File "/usr/local/lib/python2.7/dist-packages/jcvi/apps/base.py", line 81, in dispatch
    globals[action](sys.argv[2:])
  File "/usr/local/lib/python2.7/dist-packages/jcvi/assembly/allmaps.py", line 1680, in plotall
    plot(xargs + [seqid])
  File "/usr/local/lib/python2.7/dist-packages/jcvi/assembly/allmaps.py", line 1544, in plot
    colors = dict((mapname, set2[i]) for i, mapname in enumerate(mapnames))
  File "/usr/local/lib/python2.7/dist-packages/jcvi/assembly/allmaps.py", line 1544, in <genexpr>
    colors = dict((mapname, set2[i]) for i, mapname in enumerate(mapnames))
IndexError: list index out of range

Is there a limit on the number of genetic maps for plotall?

Stefano

tanghaibao commented 7 years ago

@StefanoLonardi this was an old bug that was fixed last September in https://github.com/tanghaibao/jcvi/commit/f79ead2fb30a80ead4e3b9602e0bc4a256995864. Would you please update ALLMAPS to latest version?

PS: 11 maps! wow...

Haibao

StefanoLonardi commented 7 years ago

Thank you.