Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skani external command error #606

Open
magicprotoss opened this issue Oct 14, 2024 · 2 comments
Open

Skani external command error #606

magicprotoss opened this issue Oct 14, 2024 · 2 comments
Labels
error Help required for a GTDB-Tk error.

Comments

@magicprotoss
Copy link

Issue: the command that runs skani subprocess not working properly

The command that runs skani subprocess sends the output to /dev/stdout, however on morden linux distributions this is not allowed.

I checked on both Ubuntu 22 and RockyOS 9, and go the same result:

$echo "ASDF" > /dev/stdout
bash: /dev/stdout: Permission denied

###OS Info

Debugging information

[2024-10-14 15:40:58] TASK: Calculating average nucleotide identity using skani (v0.2.2).
==> Processed 0/34 comparisons (0%) | | [?comparison/s, ETA ?][2024-10-14 15:40:58] ERROR: STDOUT:

[2024-10-14 15:40:58] ERROR: STDERR:
[00:00:00.000] (73ee5ec73800) INFO skani dist --medium -q query_genome/M23.fna -r /mnt/gtdbtk-db/skani/database/GCF/004/123/795/GCF_004123795.1_genomic.fna.gz -o /dev/stdout
[00:00:00.134] (73ee5ec73800) INFO Learned ANI mode detected. ANI may be adjusted according to a regression model trained on MAGs.
[00:00:00.134] (73ee5ec73800) INFO Generating sketch time: 0.13419788
thread 'main' panicked at src/file_io.rs:661:60:
/dev/stdout: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Process Process-115:
Traceback (most recent call last):
File "/home/navi/miniconda3/envs/gtdbtk-2.4.0/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/home/navi/miniconda3/envs/gtdbtk-2.4.0/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/navi/miniconda3/envs/gtdbtk-2.4.0/lib/python3.8/site-packages/gtdbtk/external/skani.py", line 157, in _worker
result = self.run_proc(q, r, q_path, r_path, preset)
File "/home/navi/miniconda3/envs/gtdbtk-2.4.0/lib/python3.8/site-packages/gtdbtk/external/skani.py", line 211, in run_proc
raise GTDBTkExit('skani returned a non-zero exit code.')
gtdbtk.exceptions.GTDBTkExit: skani returned a non-zero exit code.
[2024-10-14 15:40:58] ERROR: skani returned a non-zero exit code.
[2024-10-14 15:40:58] ERROR: Controlled exit resulting from an unrecoverable error or warning.

@magicprotoss magicprotoss added the error Help required for a GTDB-Tk error. label Oct 14, 2024
@pchaumeil
Copy link
Collaborator

Hi,
How are you running GTDB-Tk? are you using docker? if so , Are you starting the docker as root? Docker can block /dev/stdout to unprivileged user is the docker image was started as su

@magicprotoss
Copy link
Author

Hi, How are you running GTDB-Tk? are you using docker? if so , Are you starting the docker as root? Docker can block /dev/stdout to unprivileged user is the docker image was started as su

Hi, we are running gtdb-tk natively installed in linux enviroment via conda, we think the issue was that the system had some security hardening feautures enbaled by default that blocks outputing to /dev/stdout. (both ubuntu22LTS and RockyOS9 exibit the same behavior)

I think changing that line of code to output to a temp file then read from it would be a better :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error Help required for a GTDB-Tk error.
Projects
None yet
Development

No branches or pull requests

2 participants