mahulchak / quickmerge

A simple and fast metassembler and assembly gap filler designed for long molecule based assemblies.
GNU General Public License v3.0
192 stars 31 forks source link

[Mac] Running merge_wrapper.py in conda : No such file or directory: 'nucmer': 'nucmer' #63

Open RxLoutre opened 3 years ago

RxLoutre commented 3 years ago

Hi Mahul !

I have encountered some issues trying to run quickmerge within my conda environement.

I have installed quickmerge using the following :

conda install -c conda-forge -c bioconda quickmerge

No issues were raised, and quickmerge and mummer appear in my "conda list"

When trying to run the wrapper within my environment I get :

merge_wrapper.py D_hybrid_unicycler_assembly.fasta C_flye_assembly.fasta
Traceback (most recent call last):
  File "/Users/roxaneboyer/miniconda3/envs/assembly/bin/merge_wrapper.py", line 150, in <module>
    subprocess.call(['nucmer','-l','100','-prefix',str(prefix),str(selfpath),str(hypath)])
  File "/Users/roxaneboyer/miniconda3/envs/assembly/lib/python3.7/subprocess.py", line 339, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/Users/roxaneboyer/miniconda3/envs/assembly/lib/python3.7/subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "/Users/roxaneboyer/miniconda3/envs/assembly/lib/python3.7/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'nucmer': 'nucmer'

And trying to run directly nucmer I get this :

nucmer -l 100 -prefix preMerge D_hybrid_unicycler_assembly.fasta C_flye_assembly.fasta
zsh: /Users/roxaneboyer/miniconda3/envs/assembly/bin/nucmer: bad interpreter: /usr/local/bin/perl: no such file or directory

Perl is installed both outside the conda env and within the conda env.

Within the conda env, when I start typing "nuc" and tabing for autocompletion, it offers me to complete it with nucmer. But then when I try nucmer -h :

zsh: /Users/roxaneboyer/miniconda3/envs/assembly/bin/nucmer: bad interpreter: /usr/local/bin/perl: no such file or directory

As I am running this on MAC, could it be an issue similar like this : https://stackoverflow.com/questions/17131249/how-to-solve-bad-interpreter-no-such-file-or-directory/17131267

But then would it means I have to modify the nucmer script and/or the merge_wrapper ? 🤔 I am a bit noobish on mac still. Do you have an idea about how to solve this issue ?

Thank you for you help !

Best regards,

Roxane

mahulchak commented 3 years ago

Hi Roxane,

I don't have access to a mac system and so I can't troubleshoot it directly. However, it seems like you could probably edit the nucmer script to include the correct path and see if that works.

On Mon, May 31, 2021, 06:48 Roxane Boyer @.***> wrote:

Hi Mahul !

I have encountered some issues trying to run quickmerge within my conda environement.

I have installed quickmerge using the following :

conda install -c conda-forge -c bioconda quickmerge

No issues were raised, and quickmerge and mummer appear in my "conda list"

When trying to run the wrapper within my environment I get :

merge_wrapper.py D_hybrid_unicycler_assembly.fasta C_flye_assembly.fasta

Traceback (most recent call last):

File "/Users/roxaneboyer/miniconda3/envs/assembly/bin/merge_wrapper.py", line 150, in

subprocess.call(['nucmer','-l','100','-prefix',str(prefix),str(selfpath),str(hypath)])

File "/Users/roxaneboyer/miniconda3/envs/assembly/lib/python3.7/subprocess.py", line 339, in call

with Popen(*popenargs, **kwargs) as p:

File "/Users/roxaneboyer/miniconda3/envs/assembly/lib/python3.7/subprocess.py", line 800, in init

restore_signals, start_new_session)

File "/Users/roxaneboyer/miniconda3/envs/assembly/lib/python3.7/subprocess.py", line 1551, in _execute_child

raise child_exception_type(errno_num, err_msg, err_filename)

FileNotFoundError: [Errno 2] No such file or directory: 'nucmer': 'nucmer'

And trying to run directly nucmer I get this :

nucmer -l 100 -prefix preMerge D_hybrid_unicycler_assembly.fasta C_flye_assembly.fasta

zsh: /Users/roxaneboyer/miniconda3/envs/assembly/bin/nucmer: bad interpreter: /usr/local/bin/perl: no such file or directory

Perl is installed both outside the conda env and within the conda env.

Within the conda env, when I start typing "nuc" and tabing for autocompletion, it offers me to complete it with nucmer. But then when I try nucmer -h :

zsh: /Users/roxaneboyer/miniconda3/envs/assembly/bin/nucmer: bad interpreter: /usr/local/bin/perl: no such file or directory

As I am running this on MAC, could it be an issue similar like this : https://stackoverflow.com/questions/17131249/how-to-solve-bad-interpreter-no-such-file-or-directory/17131267

But then would it means I have to modify the nucmer script and/or the merge_wrapper ? 🤔 I am a bit noobish on mac still. Do you have an idea about how to solve this issue ?

Thank you for you help !

Best regards,

Roxane

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mahulchak/quickmerge/issues/63, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZQH2BPVGEOVIZGIXRCO63TQOGWNANCNFSM4525JMYQ .

khush876 commented 3 years ago

Hi Roxane,

you need to set the conda environment

You can follow this if it helps

conda create -n quickmerge conda activate quickmerge conda install quickmerge

nucmer ...

delta ....

quickmerge ..

hope it helps

rpbap commented 1 year ago

The problem is with the mummer version that has a bug with Perl.

Do a mummer downgrade inside your environment:

mamba install mummer=3.23=h6de7cb9_11

This version will work

I hope it helps =)

Best,

Rodrigo