nanoporetech / megalodon

Megalodon is a research command line tool to extract high accuracy modified base and sequence variant calls from raw nanopore reads by anchoring the information rich basecalling neural network output to a reference genome/transriptome.
Other
197 stars 30 forks source link

[Errno 13] Permission error #259

Closed Valledor closed 2 years ago

Valledor commented 2 years ago

Hi! I've just installed megalodon but I cannot execute it under WSL. Guppy runs perfectly when executed alone, but trying this:

$ megalodon barcode04/ --guppy-params "-d rerio/basecall_models/" --guppy-config res_dna_r941_min_modbases-all-context_v001.cfg --outputs basecalls mappings mod_mappings mods --reference chlamy.fa --devices 0 --processes 16 --overwrite --output-directory pepe2 --guppy-server-path X X - I've tried different paths, setting rwx permissions in all cases.

Any hint how can I solve it? Many thanks in advance.

Output: [15:00:34] Running Megalodon version 2.4.2 **** WARNING: "mods" output requested, so "per_read_mods" will be added to outputs. **** [15:00:34] Loading guppy basecalling backend Traceback (most recent call last): File "/home/usuario/.local/bin/megalodon", line 8, in sys.exit(_main()) File "/home/usuario/.local/lib/python3.8/site-packages/megalodon/main.py", line 754, in _main megalodon._main(args) File "/home/usuario/.local/lib/python3.8/site-packages/megalodon/megalodon.py", line 1801, in _main model_info = backends.ModelInfo( File "/home/usuario/.local/lib/python3.8/site-packages/megalodon/backends.py", line 599, in init self.pyguppy_load_settings( File "/home/usuario/.local/lib/python3.8/site-packages/megalodon/backends.py", line 1168, in pyguppy_load_settings self.pyguppy_check_version(pyguppy_version_str) File "/home/usuario/.local/lib/python3.8/site-packages/megalodon/backends.py", line 920, in pyguppy_check_version check_vers_proc = subprocess.Popen( File "/usr/lib/python3.8/subprocess.py", line 858, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: '.'

Log file output: [15:00:34] Running Megalodon version 2.4.2 DBG 15:00:34 : Command: """/home/usuario/.local/bin/megalodon barcode04/ --guppy-params -d rerio/basecall_models/ --guppy-config res_dna_r941_min_modbases-all-context_v001.cfg --outputs basecalls mappings mod_mappings mods --reference chlamy.fa --devices 0 --processes 16 --overwrite --output-directory pepe2 --guppy-server-path .""" --- MainProcess-MainThread megalodon.py:1791 **** WARNING: "mods" output requested, so "per_read_mods" will be added to outputs. **** [15:00:34] Loading guppy basecalling backend

marcus1487 commented 2 years ago

This looks like an issue with the guppy installation. Can you try to run ./ont-guppy/bin/guppy_basecall_server -v?

Valledor commented 2 years ago

Sorry for the delay, This is the output:

: Guppy Basecall Service Software, (C) Oxford Nanopore Technologies, Limited. Version 6.0.1+652ffd1, client-server API version 10.0.0

marcus1487 commented 2 years ago

This error occurs when megalodon tries to run this exact command. Can you confirm that the path provided to your megalodon command (via --guppy-server-path) is the exact same as the path resulting in the posted text.

Valledor commented 2 years ago

Yes, confirmed. I use the same absolute path "/home/usuario/ont-guppy/bin/" in both cases, and executing from the same directory.

marcus1487 commented 2 years ago

The megalodon option requires the path to the guppy_basecall_server executable not the directory containing the executable. Providing this path should resolve this issue.

  --guppy-server-path GUPPY_SERVER_PATH
                        Path to guppy server executable. Default: ./ont-guppy/bin/guppy_basecall_server
Valledor commented 2 years ago

It seems to work now. Thank you!!