Closed mdehollander closed 6 years ago
Exit code 6 is IIRC "invalid file handle". What does the log say? My best guess is that this is due to the logging subsystem trying to open /dev/stderr
and failing. Try adding log: {bla}.log
and --log-file {log}
to your rule.
@mdehollander Did you figure out what was going on?
I had a look again and now used the latest version from bioconda. Now I get a 141 exit code when I run it directly, not in a snakemake rule (with snakemake it also still fails). This is the command I use.
$ sina --log-file sina.log -i test.fasta --intype fasta -o sina.align \
--outtype fasta --meta-fmt csv \
--ptdb /data/db/Silva/128/SSURef_NR99_128_SILVA_07_09_16_opt.arb \
--overhang remove --turn all --search \
--search-db /data/db/Silva/128/SSURef_NR99_128_SILVA_07_09_16_opt.arb \
--search-min-sim 0.95 --search-no-fast --search-kmer-len 10 --lca-fields tax_slv
$ echo $?
141
The complete output can be seen at https://paste.ubuntu.com/25124176/
Could it be that there is a filehandle still open and that it complains that sina stops without closing it?
141 is SIGPIPE
. Probably because SINA tried to read from the pipe coming from the PT server when that process was already terminated. So a bug in the handling of the background process shutdown. Looking at the log, SINA completed its run though. You should have sequences in the output and a log to show that it worked.
I'm not certain how much work I want to invest into the PT server handling. I've got an internal kmer search half ready that would replace it and should be faster anyway.
The output is indeed there and looks fine. I managed to force a 0 exit code by adding || :
to the end of the line. Not really elegant, but it works. Wouldn't invest to much time in it, improvements like a kmer search or multiprocessing are more useful time investments I would say.
|| true
is a more obvious way of saying "exit code ignored". If you add a 2> sina.errorlog
you can then check for crashes with grep -q "SINA finished." sina.errorlog
. Not perfect, but it'll do.
Since we moved to a new server running Ubuntu 16.04, I got the sina binary from here (1.3.1-a5). The programs runs fine and produces output, but when I integrate it in Snakemake it complains that it returns a non-zero exit status 6. And therefore it removes the output files. Any idea why it doesn't give a 0 exit code?