Skip to content

Commit

Permalink
Change ens version and add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Cinzia Malangone committed Apr 1, 2020
1 parent c69e091 commit 2f573c0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion modules/GoogleBucketResource.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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)
Expand Down
1 change: 1 addition & 0 deletions modules/RetrieveResource.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 2f573c0

Please sign in to comment.