labgem / PPanGGOLiN

Build a partitioned pangenome graph from microbial genomes
https://ppanggolin.readthedocs.io
Other
242 stars 29 forks source link

Attribute error when draw spots #106

Closed Quentinfdg closed 1 year ago

Quentinfdg commented 1 year ago

I construct my pangenome and I tried to draw spots but I got an unexcepted error.

2023-02-09 10:33:06 draw_spot.py:l656 INFO      Drawing 314 spots
2023-02-09 10:33:06 draw_spot.py:l565 INFO      Ordering genes among regions, and drawing spots...
  0%|                                                                                               | 0/314 [00:00<?, ?spot/s]
Traceback (most recent call last):
  File "/env/cns/home/qfernand/miniconda3/envs/panorama/bin/ppanggolin", line 8, in <module>
    sys.exit(main())
  File "/env/cns/home/qfernand/miniconda3/envs/panorama/lib/python3.9/site-packages/ppanggolin/main.py", line 163, in main
    ppanggolin.figures.launch(args)
  File "/env/cns/home/qfernand/miniconda3/envs/panorama/lib/python3.9/site-packages/ppanggolin/figures/drawing.py", line 34, in launch
    draw_spots(pangenome=pangenome, output=args.output, spot_list=args.spots, disable_bar=args.disable_prog_bar)
  File "/env/cns/home/qfernand/miniconda3/envs/panorama/lib/python3.9/site-packages/ppanggolin/figures/draw_spot.py", line 658, in draw_spots
    draw_selected_spots(selected_spots, pangenome, output,
  File "/env/cns/home/qfernand/miniconda3/envs/panorama/lib/python3.9/site-packages/ppanggolin/figures/draw_spot.py", line 621, in draw_selected_spots
    draw_curr_spot(uniq_gene_lists, ordered_counts, fam2mod, famcolors, fname)
  File "/env/cns/home/qfernand/miniconda3/envs/panorama/lib/python3.9/site-packages/ppanggolin/figures/draw_spot.py", line 521, in draw_curr_spot
    fig = figure(title="spot graphic", plot_width=1600, plot_height=600,
  File "/env/cns/home/qfernand/miniconda3/envs/panorama/lib/python3.9/site-packages/bokeh/plotting/_figure.py", line 190, in __init__
    self._raise_attribute_error_with_matches(name, names | opts.properties())
  File "/env/cns/home/qfernand/miniconda3/envs/panorama/lib/python3.9/site-packages/bokeh/core/has_props.py", line 368, in _raise_attribute_error_with_matches
    raise AttributeError(f"unexpected attribute {name!r} to {self.__class__.__name__}, {text} attributes are {nice_join(matches)}")
AttributeError: unexpected attribute 'plot_width' to figure, similar attributes are outer_width, width or min_width

My pangenome information :

>>ppanggolin info --content --status --parameters -p pangenome_brady_diazoefficiens/pangenome_brady_diazoefficiens.h5
genomes annotated : true
genes clustered : true
genes have their sequences : true
gene families have their sequences : true
neighbors graph : true
pangenome partitioned : true
RGP predicted : true
Spots predicted : true
Modules predicted : true
PPanGGOLiN version : 1.2.105
Genes: 335385
Organisms: 44
Families: 28013
Edges: 41637
Persistent (min:0.68, max:1.0, sd:0.04, mean:0.98 ): 3978
Shell ( min:0.11, max:0.93, sd:0.22, mean:0.44 ): 6212
Cloud ( min:0.02, max:0.41, sd:0.04, mean:0.05 ): 17823
Number of partitions: 7
Shell S3 : 2361
Shell S2 : 676
Shell S1 : 441
Shell S4 : 729
Shell S5 : 2004
Shell S_ : 1
RGPs: 7399
Spots: 549
Modules: 1058
Families in Modules: 8159
annotation
    used_local_identifiers : True
    read_pseudogenes : False
    read_annotations_from_file : True
cluster
    coverage : 0.8
    identity : 0.8
    defragmentation : True
    translation_table : 11
    read_clustering_from_file : False
graph
    removed_high_copy_number_families : False
partition
    beta : 2.5
    free_dispersion : False
    max_node_degree_for_smoothing : 10
    computed_K : True
    K : 7
RGP
    persistent_penalty : 3
    variable_gain : 1
    min_length : 3000
    min_score : 4
    dup_margin : 0.05
spots
    set_size : 3
    overlapping_match : 2
    exact_match : 1
modules
    size : 3
    min_presence : 2
    transitive : 4
    jaccard : 0.85
    dup_margin : 0.05
axbazin commented 1 year ago

Can this be related to the bokeh library version mismatch that we have on the CI @jpjarnoux ?

axbazin commented 1 year ago

I'm assuming this was fixed with the last release fixing the recipe. If not, don't hesitate to reopen and provide more details :)

Adelme