vinisalazar / metaphor

Metaphor: a general-purpose workflow for assembly and binning of metagenomes
https://metaphor-workflow.readthedocs.io/
Other
35 stars 3 forks source link

Latex module fails when making reports #45

Closed camilogarciabotero closed 1 year ago

camilogarciabotero commented 1 year ago

Hi @vinisalazar,

Thanks for working on Metaphor. I'm using it and it is amazing for automating all the metagenome analysis steps. I'm having a little problem in the report step: here the error:

05/15/2023 11:40:54 Failed to process string with tex because latex could not be found
05/15/2023 11:40:54 Traceback (most recent call last):
  File "/.miniconda3/envs/metaphor/lib/python3.11/site-packages/me
taphor/config/conda/f49620795d1116af0a28398fec249481_/lib/python3.11/site-packages/matplotlib/texmanager.py"
, line 255, in _run_checked_subprocess
    report = subprocess.check_output(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.miniconda3/envs/metaphor/lib/python3.11/site-packages/me
taphor/config/conda/f49620795d1116af0a28398fec249481_/lib/python3.11/subprocess.py", line 466, in check_outp
ut
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.miniconda3/envs/metaphor/lib/python3.11/site-packages/me
taphor/config/conda/f49620795d1116af0a28398fec249481_/lib/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.miniconda3/envs/metaphor/lib/python3.11/site-packages/me
taphor/config/conda/f49620795d1116af0a28398fec249481_/lib/python3.11/subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/.miniconda3/envs/metaphor/lib/python3.11/site-packages/me
taphor/config/conda/f49620795d1116af0a28398fec249481_/lib/python3.11/subprocess.py", line 1917, in _execute_
child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'latex'

I'm using metaphor v1.7.5 on computer cluster with Linux. I installed metaphor via conda.

Do you know if there is way to solve this?

vinisalazar commented 1 year ago

Dear @camilogarciabotero,

Thank you for reporting this problem. This is happening because LaTeX is not installed in your system. However, this is caused by an oversight on my end as I included some LaTeX-specific configuration in this last release of Metaphor. I will upload v1.7.6 soon which should fix that.

Right now, I see different ways that you could fix your problem: 1) Install LaTeX in your system. More information available here and here. 2) Update Metaphor to v1.7.6. It should take 1-2 days for the new version to be available from Bioconda, or alternatively install from source using GitHub. 3) Disable the report with the --skip-report option. I find it weird that your problem comes up only in the report building step, rather than when it generates the plots, which is where the LaTeX-dependent code is, however you could try this anyway.

Please let me know how it goes, and if you need further help with your problem. Thank you for using Metaphor.

Best, V

vinisalazar commented 1 year ago

Hi @camilogarciabotero, just to let you know that v1.7.6 is now available from Bioconda, hopefully it should fix the LaTeX problem.

Thank you, V

camilogarciabotero commented 1 year ago

Hey V,

Thank you. That was a flash response. It solved indeed the problem. I got a weird plot for the taxa abundances, but i will close this issue an and open a different one.

Thanks, again. Camilo.