From cf811479f2fb00337652fb64c612a83c040c36ad Mon Sep 17 00:00:00 2001
From: Loraine Gueguen <loraine.gueguen@sb-roscoff.fr>
Date: Sun, 16 May 2021 14:51:33 +0200
Subject: [PATCH] fix datasets path in gga_get_data.py

---
 gga_get_data.py | 20 ++++++++------------
 utilities.py    |  2 +-
 2 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/gga_get_data.py b/gga_get_data.py
index 9950a86..992e5c6 100755
--- a/gga_get_data.py
+++ b/gga_get_data.py
@@ -88,18 +88,14 @@ class GetData(speciesData.SpeciesData):
         organism_annotation_dir = os.path.abspath("./src_data/annotation/{0}/OGS{1}".format(self.species_folder_name, self.ogs_version))
         organism_genome_dir = os.path.abspath("./src_data/genome/{0}/v{1}".format(self.species_folder_name, self.genome_version))
 
-        genome_datasets = [constants.ORG_PARAM_DATA_GENOME_PATH]
-        annotation_datasets = [constants.ORG_PARAM_DATA_GFF_PATH,
-                               constants.ORG_PARAM_DATA_TRANSCRIPTS_PATH,
-                               constants.ORG_PARAM_DATA_PROTEINS_PATH,
-                               constants.ORG_PARAM_DATA_INTERPRO_PATH,
-                               constants.ORG_PARAM_DATA_ORTHOFINDER_PATH,
-                               constants.ORG_PARAM_DATA_BLASTP_PATH,
-                               constants.ORG_PARAM_DATA_BLASTX_PATH]
-        # Where to store blast results?
-
-        # search_excluded_datasets = ["interpro_path", "orthofinder_path", "blastp_path", "blastx_path"]  
-        # These datasets will not be searched if missing in the input file
+        genome_datasets = {constants.ORG_PARAM_DATA_GENOME_PATH: self.genome_path}
+        annotation_datasets = {constants.ORG_PARAM_DATA_GFF_PATH: self.gff_path,
+                               constants.ORG_PARAM_DATA_TRANSCRIPTS_PATH: self.transcripts_path,
+                               constants.ORG_PARAM_DATA_PROTEINS_PATH: self.proteins_path,
+                               constants.ORG_PARAM_DATA_INTERPRO_PATH: self.interpro_path,
+                               constants.ORG_PARAM_DATA_ORTHOFINDER_PATH: self.orthofinder_path,
+                               constants.ORG_PARAM_DATA_BLASTP_PATH: self.blastp_path,
+                               constants.ORG_PARAM_DATA_BLASTX_PATH: self.blastx_path}
 
         # Copy datasets in the organism src_data dir tree correct folder
         for k, v in genome_datasets.items():
diff --git a/utilities.py b/utilities.py
index 3e23ef4..3d734f2 100755
--- a/utilities.py
+++ b/utilities.py
@@ -37,7 +37,7 @@ def parse_config(config_file):
 
     config_dict = load_yaml(config_file)
     if isinstance(config_dict, dict):
-        logging.debug("Config dictionary: {0}".format(config_dict))
+        #logging.debug("Config dictionary: {0}".format(config_dict))
         return config_dict
     else:
         logging.critical("Config yaml file is not a dictionary" % config_file)
-- 
GitLab