Skip to content
Snippets Groups Projects
Commit 06e80ae5 authored by Dominik Burri's avatar Dominik Burri
Browse files

use onsuccess to properly remove index dirs

parent c95864b2
No related branches found
No related tags found
1 merge request!78Remove unnecessary files in results directory
......@@ -38,6 +38,12 @@ if cluster_config:
include: os.path.join("workflow", "rules", "paired_end.snakefile.smk")
include: os.path.join("workflow", "rules", "single_end.snakefile.smk")
onsuccess:
print("Workflow finished, no error.")
os.system("rm -rv " + config['kallisto_indexes'])
os.system("rm -rv " + config['salmon_indexes'])
os.system("rm -rv " + config['alfa_indexes'])
rule finish:
"""
Rule for collecting outputs
......@@ -195,8 +201,6 @@ rule create_index_star:
"STAR_index",
"chrName.txt")
shadow: "full"
params:
output_dir = os.path.join(
config['star_indexes'],
......@@ -386,8 +390,6 @@ rule create_index_kallisto:
"{organism}",
"kallisto.idx")
shadow: "full"
params:
output_dir = os.path.join(
config['kallisto_indexes'],
......
......@@ -401,7 +401,13 @@ rule pe_genome_quantification_kallisto:
"samples",
"{sample}",
"quant_kallisto",
"{sample}.pe.kallisto.pseudo.sam")
"{sample}.pe.kallisto.pseudo.sam"),
abundances = os.path.join(
config["output_dir"],
"samples",
"{sample}",
"quant_kallisto",
"abundance.h5")
shadow: "full"
......
......@@ -343,7 +343,14 @@ rule genome_quantification_kallisto:
"samples",
"{sample}",
"quant_kallisto",
"{sample}.se.kallisto.pseudo.sam")
"{sample}.se.kallisto.pseudo.sam"),
abundances = os.path.join(
config["output_dir"],
"samples",
"{sample}",
"quant_kallisto",
"abundance.h5")
shadow: "full"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment