From b9b0bf1112b763331605995c4d548617c705d70b Mon Sep 17 00:00:00 2001
From: Floreal Cabanettes <floreal.cabanettes@inra.fr>
Date: Mon, 6 Aug 2018 17:46:39 +0200
Subject: [PATCH] Fix for simulation

---
 snakecnv/detection.snk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/snakecnv/detection.snk b/snakecnv/detection.snk
index 60a8f00..785c50a 100644
--- a/snakecnv/detection.snk
+++ b/snakecnv/detection.snk
@@ -91,8 +91,9 @@ tools = config['tools']
 # list of chromosomes
 chromosomes = config["chromosomes"]
 chr_batches = {}
+ref_chr = "reference_raw.fasta" if not os.path.exists(REFERENCE) and os.path.exists("reference_raw.fasta") else REFERENCE
 for chromosome in chromosomes:
-    chr_batches[chromosome] = get_chr_batches(REFERENCE, chromosome)
+    chr_batches[chromosome] = get_chr_batches(ref_chr, chromosome)
 
 # list of variants to be detected
 varianttypes = ['DEL', 'INV', 'DUP', 'mCNV']
-- 
GitLab