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
Loading
...@@ -71,7 +71,7 @@ class SnakemakeUtils: ...@@ -71,7 +71,7 @@ class SnakemakeUtils:
def get_pindel_chr_batches(self, wildcards): def get_pindel_chr_batches(self, wildcards):
inputs = [] inputs = []
for batch in self.chr_batches[wildcards.chrom]: 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)), batch=wildcards.batch, chrom=wildcards.chrom, chrbatch="-".join(map(str, batch)),
svtype=wildcards.svtype svtype=wildcards.svtype
)) ))
......
...@@ -30,9 +30,9 @@ rule pindel: ...@@ -30,9 +30,9 @@ rule pindel:
genome = REFERENCE, genome = REFERENCE,
fai = REFERENCE + ".fai" fai = REFERENCE + ".fai"
output: output:
"{batch}/pindel/{chrbatch}/pindel_{chrom}_D.gz", "{batch}/pindel/{chrom}/{chrbatch}/pindel_{chrom}_D.gz",
"{batch}/pindel/{chrbatch}/pindel_{chrom}_INV.gz", "{batch}/pindel/{chrom}/{chrbatch}/pindel_{chrom}_INV.gz",
"{batch}/pindel/{chrbatch}/pindel_{chrom}_TD.gz", "{batch}/pindel/{chrom}/{chrbatch}/pindel_{chrom}_TD.gz",
threads: threads:
get_threads("pindel", 4) get_threads("pindel", 4)
log: log:
...@@ -50,7 +50,7 @@ rule pindel: ...@@ -50,7 +50,7 @@ rule pindel:
""" """
for svtype in D TD INV RP SI LI BP CloseEndMapped INT_final; for svtype in D TD INV RP SI LI BP CloseEndMapped INT_final;
do 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 done
""" """
...@@ -65,4 +65,5 @@ rule mergepindelbatches: ...@@ -65,4 +65,5 @@ rule mergepindelbatches:
threads: threads:
1 1
shell: shell:
"mergepindelbatches.py {output} {input} 1>{log.stdout} 2>{log.stderr}" "mergepindelbatches.py {output} {input} 1>{log.stdout} 2>{log.stderr}; "
\ No newline at end of file "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