Skip to content

Commit

Permalink
removing temp files
Browse files Browse the repository at this point in the history
  • Loading branch information
niekwit committed Jul 5, 2024
1 parent b3a33ad commit 680e672
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions workflow/rules/damid.smk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if config["plasmid_fasta"] == "none":
),
output:
bf=expand("results/bedgraph/{{dir}}/{bg_sample}-vs-Dam-norm.gatc.bedgraph", bg_sample=BG_SAMPLES),
bam=expand("results/bam/{{dir}}/{sample}.bam", sample=SAMPLES),
bam=temp(expand("results/bam/{{dir}}/{sample}.bam", sample=SAMPLES)),
params:
idxdir=lambda wildcards, input: input["idx"][0][:-6],
paired=paired_end,
Expand Down Expand Up @@ -87,7 +87,7 @@ else:
),
output:
bf=expand("results/bedgraph/{{dir}}/{bg_sample}-vs-Dam-norm.gatc.bedgraph", bg_sample=BG_SAMPLES),
bam=expand("results/bam/{{dir}}/{sample}.bam", sample=SAMPLES),
bam=temp(expand("results/bam/{{dir}}/{sample}.bam", sample=SAMPLES)),
params:
idxdir=lambda wildcards, input: input["idx"][0][:-6],
paired=paired_end,
Expand Down Expand Up @@ -153,7 +153,7 @@ else:
),
output:
bf=expand("results/bedgraph/{{dir}}/{bg_sample}-vs-Dam.norm.gatc.bedgraph", bg_sample=BG_SAMPLES),
bam=expand("results/bam/{{dir}}/{sample}.bam", sample=SAMPLES),
bam=temp(expand("results/bam/{{dir}}/{sample}.bam", sample=SAMPLES)),
params:
idxdir=lambda wildcards, input: input["idx"][0][:-6],
paired=paired_end,
Expand Down
5 changes: 5 additions & 0 deletions workflow/scripts/damidseq_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ def allfastq(directory):
new_name = bam.replace("-ext300", "")
os.rename(bam, new_name)

# Remove all trimmed fastq files
shell(
"rm results/trimmed/{directory}/*.fastq.gz"
)

# Destroy temporary directory
print(f"Cleaning up temporary directory {temp_dir.name}")
temp_dir.cleanup()

0 comments on commit 680e672

Please sign in to comment.