4

While running my snakemake file in cluster I keep getting an error,

snakemake -j 20 --cluster "qsub -o out.txt -e err.txt -q debug" -s 
seadragon/scripts/viral_hisat.snake --config json="<input file>" 
output="<output file>"

Now this gives me the follwing error,

Error in job run_salmon while creating output file 
/gpfs/home/user/seadragon/output/quant_v2_4/test.
ClusterJobException in line 58 of seadragon/scripts/viral_hisat.snake
:
Error executing rule run_salmon on cluster (jobid: 1, external: 156618.sn-mgmt.cm.cluster, jobscript: /gpfs/home/user/.snakemake/tmp.j9nb0hyo/snakejob.run_salmon.1.sh). For detailed error see the cluster log.
Will exit after finishing currently running jobs.
Exiting because a job execution failed. Look above for error message

Now I don't find any way to track the error, since my cluster does not give me an way to store the log files, on the other hand /gpfs/home/user/.snakemake/tmp.j9nb0hyo/snakejob.run_salmon.1.sh file is deleted immediately after finishing. Please let me know if there is an way to keep this shell file even if the snakemake fails.

Hirak Sarkar
  • 125
  • 8

2 Answers2

0

I am not a qsub user anymore, but if I remember correctly, stdout and stderr are stored in the working directory, under the jobid that Snakemake gives you under external in the error message.

Johannes Köster
  • 1,809
  • 6
  • 8
0

You need to redirect the standard output and standard error output to a file yourself instead of relying on the cluster or snakemake to do this for you.

Instead of the following

my_script.sh

Run the following

my_script.sh > output_file.txt 2> error_file.txt
Parsa
  • 3,054
  • 3
  • 19
  • 35