Skip to content
Snippets Groups Projects
Commit dea55fc2 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Pindel windows: place in a subdir, remove subdir after merge

parent 89eba335
No related branches found
No related tags found
1 merge request!12Split pindel detection in 20mb windows
......@@ -71,7 +71,7 @@ class SnakemakeUtils:
def get_pindel_chr_batches(self, wildcards):
inputs = []
for batch in self.chr_batches[wildcards.chrom]:
inputs.append("{batch}/pindel/{chrbatch}/pindel_{chrom}_{svtype}.gz".format(
inputs.append("{batch}/pindel/{chrom}/{chrbatch}/pindel_{chrom}_{svtype}.gz".format(
batch=wildcards.batch, chrom=wildcards.chrom, chrbatch="-".join(map(str, batch)),
svtype=wildcards.svtype
))
......
......@@ -30,9 +30,9 @@ rule pindel:
genome = REFERENCE,
fai = REFERENCE + ".fai"
output:
"{batch}/pindel/{chrbatch}/pindel_{chrom}_D.gz",
"{batch}/pindel/{chrbatch}/pindel_{chrom}_INV.gz",
"{batch}/pindel/{chrbatch}/pindel_{chrom}_TD.gz",
"{batch}/pindel/{chrom}/{chrbatch}/pindel_{chrom}_D.gz",
"{batch}/pindel/{chrom}/{chrbatch}/pindel_{chrom}_INV.gz",
"{batch}/pindel/{chrom}/{chrbatch}/pindel_{chrom}_TD.gz",
threads:
get_threads("pindel", 4)
log:
......@@ -50,7 +50,7 @@ rule pindel:
"""
for svtype in D TD INV RP SI LI BP CloseEndMapped INT_final;
do
gzip -f {wildcards.batch}/pindel/{wildcards.chrbatch}/pindel_{wildcards.chrom}_${{svtype}}
gzip -f {wildcards.batch}/pindel/{wildcards.chrom}/{wildcards.chrbatch}/pindel_{wildcards.chrom}_${{svtype}}
done
"""
......@@ -65,4 +65,5 @@ rule mergepindelbatches:
threads:
1
shell:
"mergepindelbatches.py {output} {input} 1>{log.stdout} 2>{log.stderr}"
\ No newline at end of file
"mergepindelbatches.py {output} {input} 1>{log.stdout} 2>{log.stderr}; "
"rm -rf {wildcards.batch}/pindel/{wildcards.chrom}"
\ No newline at end of file
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