From 36c0f1f44fda57641827a4f663b867c3de95b0f0 Mon Sep 17 00:00:00 2001
From: George Marchment <georgemarchment@yahoo.fr>
Date: Mon, 11 Mar 2024 14:32:50 +0100
Subject: [PATCH] add error handling

---
 src/nextflow_file.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/nextflow_file.py b/src/nextflow_file.py
index 08f37ea..0036510 100644
--- a/src/nextflow_file.py
+++ b/src/nextflow_file.py
@@ -23,6 +23,9 @@ from .bioflowinsighterror import BioFlowInsightError
 class Nextflow_File(Nextflow_Building_Blocks):
     def __init__(self, address, duplicate = True, DSL="", author = None, name = None, origin=None, output_dir='./results', display_info = True):
         self.file = address 
+        if(self.file.find('/')!=-1):
+            raise BioFlowInsightError(f"BioFlow-Insight cannot directly analyse a workflow from its directory. Please analyse the workflow from the parent directory instead.", num = -1)
+        
         self.output_dir = Path(output_dir)
         contents = ''
         try:
-- 
GitLab