Ecogenomics / GTDBTk

GTDB-Tk: a toolkit for assigning objective taxonomic classifications to bacterial and archaeal genomes.
https://ecogenomics.github.io/GTDBTk/
GNU General Public License v3.0
479 stars 82 forks source link

Skani external command error #606

Open magicprotoss opened 1 month ago

magicprotoss commented 1 month ago

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.1genomic.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/fileio.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.

pchaumeil commented 1 month ago

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 commented 1 month ago

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 :)