Skip to content

Commit

Permalink
SLURM error handling is not very reliable, but using shadow rules
Browse files Browse the repository at this point in the history
allows Snakemake to reliably detect a cluster job failure.
  • Loading branch information
tbooth committed Mar 21, 2024
1 parent 37f4824 commit 6a29483
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Snakefile.qc
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ rule base_count_file:
# cutadapt tolerance of 10% mismatches.
rule cutadapt_scan:
output: "QC/lane{l,[0-9]+}/{fq}.cutadapt_out"
input: "{fq}.fastq.gz"
input: "{fq}.fastq.gz"
shadow: 'minimal'
params:
# 3' adapters: truseq 21 bases nextera illumina_smallrna
adapters = ["AGATCGGAAGAGCACACGTCT", "CTGTCTCTTATA", "TGGAATTCTCGGGTGCCAAGG"]
Expand All @@ -383,7 +384,7 @@ rule fqscreen:
html = "QC/lane{l,[0-9]+}/{fq}_screen.html",
png = "QC/lane{l,[0-9]+}/{fq}_screen.png"
input: "{fq}.fastq.gz"
shadow: 'shallow'
shadow: 'minimal'
params:
maxlen = 50,
subset = 1000000,
Expand All @@ -406,10 +407,10 @@ rule fqscreen:
rule fastqc:
output: zip = "QC/lane{l,[0-9]+}/{fq}_fastqc.zip",
html = "QC/lane{l,[0-9]+}/{fq}_fastqc.html"
input: "{fq}.fastq.gz"
threads: 2
input: "{fq}.fastq.gz"
shadow: 'minimal'
shell:
"{TOOLBOX} fastqc {input} --outdir `dirname {output.zip}` --noextract --nogroup --threads {threads}"
"{TOOLBOX} fastqc {input} --outdir `dirname {output.zip}` --noextract --nogroup"

# Meta-data to go at the top of the MultiQC report.
# this can change as the pipeline runs so make the rule depend on the pipeline
Expand Down

0 comments on commit 6a29483

Please sign in to comment.