From 2f573c0accc069919d6f73fd09a31c4253e3fb74 Mon Sep 17 00:00:00 2001 From: Cinzia Malangone Date: Wed, 1 Apr 2020 14:15:47 +0100 Subject: [PATCH] Change ens version and add comments --- config.yaml | 2 +- modules/GoogleBucketResource.py | 4 +++- modules/RetrieveResource.py | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.yaml b/config.yaml index d4a42bff..839b02e5 100644 --- a/config.yaml +++ b/config.yaml @@ -136,7 +136,7 @@ ensembl: conda_create: bash -c "~/anaconda2/bin/conda env create -f {root_dir}/scripts/ensembl/environment.yaml" python_script: python {script_path}/create_genes_dictionary.py -o {ensembl_output_dir}/. -e -z -n - ensembl_release: homo_sapiens_core_98_38 + ensembl_release: homo_sapiens_core_99_38 extension_file: _genes.json.gz resource: ensembl-filename gs_output_dir: annotation-files diff --git a/modules/GoogleBucketResource.py b/modules/GoogleBucketResource.py index 6328088a..b9fbb282 100644 --- a/modules/GoogleBucketResource.py +++ b/modules/GoogleBucketResource.py @@ -125,6 +125,7 @@ def copy_from(self, original_filename, dest_filename, gs_specific_output_dir = N return blob.name + # Extract any date in the format dd-mm-yyyy or yyyy-mm-dd. Return None if date are not available. def extract_date_from_file(self, filename): date_file = None find_date_file = re.search("([0-9]{2}\-[0-9]{2}\-[0-9]{4})", filename) @@ -137,6 +138,7 @@ def extract_date_from_file(self, filename): return date_file + # Return the filename with the recent date. Manage collision of dates only for the recent date. def extract_latest_file(self, list_blobs): last_recent_file = None possible_recent_date_collision = False @@ -152,7 +154,7 @@ def extract_latest_file(self, list_blobs): last_recent_file = filename if possible_recent_date_collision: - # Raise an error + # Raise an error. No filename is unique in the recent date selected. logger.error("Error TWO files with the same date: %s %s", last_recent_file, recent_date.strftime('%d-%m-%Y')) exit(1) diff --git a/modules/RetrieveResource.py b/modules/RetrieveResource.py index cccb7674..27592f2c 100644 --- a/modules/RetrieveResource.py +++ b/modules/RetrieveResource.py @@ -49,6 +49,7 @@ def annotations_downloaded_by_uri(self): self.list_files_downloaded[destination_filename] = { 'resource' : entry.resource, 'gs_output_dir': self.yaml.annotations_from_buckets.gs_output_dir } + logger.info("Files downloaded: %s", destination_filename) elif not self.args.skip: raise ValueError("Error during downloading: {}", entry.uri)