AlexanderLabWHOI / EUKulele

Automatic eukaryotic taxonomic classification
MIT License
26 stars 7 forks source link

Visualisation error #55

Open susheelbhanu opened 9 months ago

susheelbhanu commented 9 months ago

Hi,

I'm running into an error where the visualisation step is failing with the below error.

cat log/tax_vis.err

Traceback (most recent call last):
  File "/hdd0/susbus/tools/conda_env/6361a8c35b2fd5049fb8a309ca9bc4f4_/bin/EUKulele", line 8, in <module>
    EUKulele.eukulele(string_arguments=' '.join(sys.argv[1:]))
  File "/hdd0/susbus/tools/conda_env/6361a8c35b2fd5049fb8a309ca9bc4f4_/lib/python3.7/site-packages/EUKulele/EUKulele_config.py", line 32, in eukulele
    EUKulele.EUKulele_main.main(str(string_arguments))
  File "/hdd0/susbus/tools/conda_env/6361a8c35b2fd5049fb8a309ca9bc4f4_/lib/python3.7/site-packages/EUKulele/EUKulele_main.py", line 318, in main
    level_hierarchy = levels_file)
  File "/hdd0/susbus/tools/conda_env/6361a8c35b2fd5049fb8a309ca9bc4f4_/lib/python3.7/site-packages/EUKulele/manage_steps.py", line 95, in manageEukulele
    use_salmon_counts, rerun_rules, level_hierarchy)
  File "/hdd0/susbus/tools/conda_env/6361a8c35b2fd5049fb8a309ca9bc4f4_/lib/python3.7/site-packages/EUKulele/manage_steps.py", line 659, in manageTaxVisualization
    use_salmon_counts, rerun_rules, level_hierarchy)
  File "/hdd0/susbus/tools/conda_env/6361a8c35b2fd5049fb8a309ca9bc4f4_/lib/python3.7/site-packages/EUKulele/visualize_results.py", line 332, in visualize_all_results
    fig = plt.figure(figsize=(15,7.5))
  File "/hdd0/susbus/tools/conda_env/6361a8c35b2fd5049fb8a309ca9bc4f4_/lib/python3.7/site-packages/matplotlib/pyplot.py", line 693, in figure
    **kwargs)
  File "/hdd0/susbus/tools/conda_env/6361a8c35b2fd5049fb8a309ca9bc4f4_/lib/python3.7/site-packages/matplotlib/pyplot.py", line 315, in new_figure_manager
    return _backend_mod.new_figure_manager(*args, **kwargs)
  File "/hdd0/susbus/tools/conda_env/6361a8c35b2fd5049fb8a309ca9bc4f4_/lib/python3.7/site-packages/matplotlib/backend_bases.py", line 3494, in new_figure_manager
    return cls.new_figure_manager_given_figure(num, fig)
  File "/hdd0/susbus/tools/conda_env/6361a8c35b2fd5049fb8a309ca9bc4f4_/lib/python3.7/site-packages/matplotlib/backends/_backend_tk.py", line 885, in new_figure_manager_given_figure
    window = tk.Tk(className="matplotlib")
  File "/hdd0/susbus/tools/conda_env/6361a8c35b2fd5049fb8a309ca9bc4f4_/lib/python3.7/tkinter/__init__.py", line 2023, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: couldn't connect to display "localhost:10.0"

The run seems to have generated all the necessary outputs for each sample, i.e. {sample}-estimated-taxonomy.out My EUKulele and diamond version (based on another issue I found earlier) are as follows:

$>EUKulele --version
Running EUKulele with command line arguments, as no valid configuration file was provided.
The current EUKulele version is 2.0.6

$>diamond --version
diamond version 0.9.24

Maybe it's relevant, but I also found this information which may be relevant:

$> cat free.csv
               total        used        free      shared  buff/cache   available
Mem:         3094874      343682      682407         540     2068784     2733835
Swap:           1951        1920          31

Thank you for helping with this.

-Susheel

akrinos commented 8 months ago

Hi @susheelbhanu ! I haven't seen this error before, so I will investigate it a little further. However, it looks like something to do with matplotlib's ability to write files. Do you normally use the visualization output directly from EUKulele? Thanks for posting an issue about this!

susheelbhanu commented 8 months ago

Thanks for looking into this @akrinos.

I normally don't use the plots, but I'm running EUKulele in a snakemake workflow and it kills my run 'cos the job thinks it's failing. For now, i'm using the workaround of using the --keep-incomplete flag in snakemake.

Feel free to close this issue anytime if you think it's a one-off error and if others haven't reported it. Wondering if it's our system that's causing the issue too.

shanexuuu commented 8 months ago

Hi @susheelbhanu ! I haven't seen this error before, so I will investigate it a little further. However, it looks like something to do with matplotlib's ability to write files. Do you normally use the visualization output directly from EUKulele? Thanks for posting an issue about this!

Hi @akrinos, I have the same issue and my EUKulele version and diamond version same as susheelbhanu‘s. The weird thing is the tax vis part ran successfully before on our server. But yesterday it was not anymore. I also tried re-install a new EUKulele conda env and download same mmestp db, which still not work. Could you help to figure out how to fix this issue? Many thanks!

tax_vis.err is attached as follows: Traceback (most recent call last): File "/bin/miniconda3/envs/EUKulele_new/bin/EUKulele", line 8, in EUKulele.eukulele(string_arguments=' '.join(sys.argv[1:])) File "/bin/miniconda3/envs/EUKulele_new/lib/python3.7/site-packages/EUKulele/EUKulele_config.py", line 32, in eukulele EUKulele.EUKulele_main.main(str(string_arguments)) File "/bin/miniconda3/envs/EUKulele_new/lib/python3.7/site-packages/EUKulele/EUKulele_main.py", line 318, in main level_hierarchy = levels_file) File "/bin/miniconda3/envs/EUKulele_new/lib/python3.7/site-packages/EUKulele/manage_steps.py", line 95, in manageEukulele use_salmon_counts, rerun_rules, level_hierarchy) File "/bin/miniconda3/envs/EUKulele_new/lib/python3.7/site-packages/EUKulele/manage_steps.py", line 659, in manageTaxVisualization use_salmon_counts, rerun_rules, level_hierarchy) File "/bin/miniconda3/envs/EUKulele_new/lib/python3.7/site-packages/EUKulele/visualize_results.py", line 332, in visualize_all_results fig = plt.figure(figsize=(15,7.5)) File "/bin/miniconda3/envs/EUKulele_new/lib/python3.7/site-packages/matplotlib/pyplot.py", line 693, in figure *kwargs) File "/bin/miniconda3/envs/EUKulele_new/lib/python3.7/site-packages/matplotlib/pyplot.py", line 315, in new_figure_manager return _backend_mod.new_figure_manager(args, **kwargs) File "/bin/miniconda3/envs/EUKulele_new/lib/python3.7/site-packages/matplotlib/backend_bases.py", line 3494, in new_figure_manager return cls.new_figure_manager_given_figure(num, fig) File "/bin/miniconda3/envs/EUKulele_new/lib/python3.7/site-packages/matplotlib/backends/_backend_tk.py", line 885, in new_figure_manager_given_figure window = tk.Tk(className="matplotlib") File "/bin/miniconda3/envs/EUKulele_new/lib/python3.7/tkinter/init.py", line 2023, in init self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: couldn't connect to display "localhost:12.0"

akrinos commented 7 months ago

Hey @shanexuuu and @susheelbhanu , sorry I missed the update on this issue! For @shanexuuu ... it looks like some kind of connectivity issue arose? Did the problems with using EUKulele persist? @susheelbhanu is the workaround working okay for now? I hope to add some better visualization tools into future iterations of the tool, sorry for the inconvenience

shanexuuu commented 7 months ago

Hi,

Thanks for your reply. Yes, for me the problem persists! But I can avoid it by manually closing every plot one by one!

发件人: akrinos @.> 发送时间: 2023年11月30日 3:28 收件人: AlexanderLabWHOI/EUKulele @.> 抄送: XU Wenqian @.>; Mention @.> 主题: Re: [AlexanderLabWHOI/EUKulele] Visualisation error (Issue #55)

Hey @shanexuuuhttps://github.com/shanexuuu and @susheelbhanuhttps://github.com/susheelbhanu , sorry I missed the update on this issue! For @shanexuuuhttps://github.com/shanexuuu ... it looks like some kind of connectivity issue arose? Did the problems with using EUKulele persist? @susheelbhanuhttps://github.com/susheelbhanu is the workaround working okay for now? I hope to add some better visualization tools into future iterations of the tool, sorry for the inconvenience

― Reply to this email directly, view it on GitHubhttps://github.com/AlexanderLabWHOI/EUKulele/issues/55#issuecomment-1832568220, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3ETTBT4TL4ATNFSU475A3DYG6EDZAVCNFSM6AAAAAA5YNJ2OWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZSGU3DQMRSGA. You are receiving this because you were mentioned.Message ID: @.***>

susheelbhanu commented 7 months ago

@shanexuuu the conda servers were down recently for a bit and I'm wondering if you got caught in that window. @akrinos sorry for not getting back, but the -k flag in snakemake is doing the trick for me. It doesn't generate the plots, but then again, I don't use them either - everything else runs just fine.