From 89eba3358ca6cab9d78b8f9a77221900ea4633ad Mon Sep 17 00:00:00 2001
From: Floreal Cabanettes <floreal.cabanettes@inra.fr>
Date: Wed, 1 Aug 2018 16:56:29 +0200
Subject: [PATCH] Move windowed files in subdir for pindel (try fixing
 problem...)

---
 snakecnv/svsnakemake_utils.py | 2 +-
 snakecnv/tools/pindel.snk     | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/snakecnv/svsnakemake_utils.py b/snakecnv/svsnakemake_utils.py
index 697d968..b3421ea 100644
--- a/snakecnv/svsnakemake_utils.py
+++ b/snakecnv/svsnakemake_utils.py
@@ -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/pindel_{chrom}_{chrbatch}_{svtype}.gz".format(
+            inputs.append("{batch}/pindel/{chrbatch}/pindel_{chrom}_{svtype}.gz".format(
                 batch=wildcards.batch, chrom=wildcards.chrom, chrbatch="-".join(map(str, batch)),
                 svtype=wildcards.svtype
             ))
diff --git a/snakecnv/tools/pindel.snk b/snakecnv/tools/pindel.snk
index 502e609..0363803 100644
--- a/snakecnv/tools/pindel.snk
+++ b/snakecnv/tools/pindel.snk
@@ -30,9 +30,9 @@ rule pindel:
         genome = REFERENCE,
         fai = REFERENCE + ".fai"
     output:
-        "{batch}/pindel/pindel_{chrom}_{chrbatch}_D.gz",
-        "{batch}/pindel/pindel_{chrom}_{chrbatch}_INV.gz",
-        "{batch}/pindel/pindel_{chrom}_{chrbatch}_TD.gz",
+        "{batch}/pindel/{chrbatch}/pindel_{chrom}_D.gz",
+        "{batch}/pindel/{chrbatch}/pindel_{chrom}_INV.gz",
+        "{batch}/pindel/{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/pindel_{wildcards.chrom}_{wildcards.chrbatch}_${{svtype}}
+        gzip -f {wildcards.batch}/pindel/{wildcards.chrbatch}/pindel_{wildcards.chrom}_${{svtype}}
         done
         """
 
-- 
GitLab