Closed ltalignani closed 1 year ago
Seems like the interpreter is complaining about the cluster config file. Could you share that? Also you can use triple backticks to make your code more readable.
Lastly, it looks like your using your config
to specify tool paths in your shell command, its generally recommended to use conda or wrappers to achieve portability and versioning.
Thanks for your comment and sorry about the look of my code. I copied and pasted my config file directly without realizing that I use hashtags in it to separate sections. I update it soon.
I am not using a cluster config file, but a slurm profile named config.yaml
, stored in a slurm/
directory. I made this profile with the help of simple-slurm : https://github.com/jdblischak/smk-simple-slurm
jobs: 50
cluster: "sbatch --parsable -p {params.partition} -t {resources.time_min} --mem={resources.mem_mb} -c {resources.cpus} -o Cluster_logs/{rule}_{wildcards}-%j.out -e Cluster_logs/{rule}_{wildcards}-%j.err
default-resources: [cpus=1, mem_mb=4000, time_min=6000]
resources: [cpus=30, mem_mb=400000]
restart-times: 3
max-jobs-per-second: 10
max-status-checks-per-second: 1
local-cores: 8
latency-wait: 600
keep-going: true
rerun-incomplete: true
printshellcmds: true
scheduler: greedy
cluster-status: status-sacct.sh
I agree with you regarding the use of conda and wrappers, however, the tools are already installed on the cluster and thanks to them I have a significant performance gain regarding the processing time of my data if I don't use conda.
I use a bash script to launch the pipeline, containing just the following commands:
##### Colors ######
red="\033[1;31m" # red
green="\033[1;32m" # green
ylo="\033[1;33m" # yellow
blue="\033[1;34m" # blue
nc="\033[0m" # no color
###### Call snakemake pipeline ######
echo -e "${blue}Unlocking working directory:${nc}"
echo ""
snakemake --profile slurm/ --slurm --default-resources slurm_account=aedes_amplicon slurm_partition=long --directory ${workdir}/ --snakefile workflow/snakefile.smk --unlock
echo ""
echo -e "${blue}Let's run!${nc}"
echo ""
snakemake --profile slurm/ --slurm --default-resources slurm_account=aedes_amplicon slurm_partition=long -directory ${workdir}/ --snakefile workflow/snakefile.smk --cores 30 --configfile config/config.yaml
###### Create usefull graphs, summary and logs ######
mkdir ${workdir}/results/10_Graphs/ 2> /dev/null
graph_list="dag rulegraph filegraph"
extention_list="pdf png"
for graph in ${graph_list} ; do
for extention in ${extention_list} ; do
snakemake --profile slurm/ \
-slurm --default-resources slurm_account=aedes_amplicon slurm_partition=long \
--snakefile workflow/snakefile.smk --${graph} | dot -T${extention} > ${workdir}/results/10_Graphs/${graph}.${extention} ;
done ;
done
snakemake -slurm --default-resources slurm_account=aedes_amplicon slurm_partition=long \
--directory ${workdir} --profile slurm/ --snakefile workflow/snakefile.smk \
--summary > ${workdir}/results/11_Reports/files_summary.txt
###### End managment ######
I also tried to run snakemake with the command line, and I had the same error.
EDIT : I updated the code
Okay, thanks for updating that. I'm not familiar with simple-slurm, but the issue could be this line in your Snakefile:
cluster_config: "slurm/config.yaml"
I'd also recommend looking at the latest way to execute on a SLURM cluster, using the --slurm
flag.
I've updated the command launching the pipeline and I don't have this problem any more, since I no longer use the slurm profile
.
the --slurm
flag means you don't need a profile configuration, which is a great improvement.
Snakemake version: 7.25.0 (same problem on 7.7.0)
Describe the bug I am developping a snakemake pipeline on a SLURM cluster. When I run my pipeline, it crashes with the following logs. I tried to replace all the config shortcuts (like config['fastq-screen']['config']), by their values, and it works. But it's impractical and ruins the whole point of the pipeline.
Logs
Minimal example config.yaml:
and now, the snakefile:
Additional context Python 3.11, Graphviz 2.40,
I'm not sure if it's a bug, but I've never encountered this problem before. Thanks in advance for your help.