From 7f8dd85df245fcbdfd2c3f966de1f6b958678a21 Mon Sep 17 00:00:00 2001 From: Gaurav Vaidya Date: Thu, 28 Mar 2024 12:50:39 -0400 Subject: [PATCH 1/2] Turn off verbose mode (now that it actually works). --- scripts/babel-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/babel-build.sh b/scripts/babel-build.sh index 6b45018e..653de19e 100644 --- a/scripts/babel-build.sh +++ b/scripts/babel-build.sh @@ -14,7 +14,7 @@ export CORES=5 export DRY_RUN=1 # Verbose: if set, produce verbose output. -export VERBOSE=1 +export VERBOSE= # Keep going: if set, then keep going if one job errors out. export KEEP_GOING=1 From 3df15fcb006c09ef54e3698a1a687a8ab765acd9 Mon Sep 17 00:00:00 2001 From: Gaurav Vaidya Date: Thu, 28 Mar 2024 12:48:40 -0400 Subject: [PATCH 2/2] Updated synonym test to look for duplicated synonym files. --- src/snakefiles/reports.snakefile | 4 +-- src/snakefiles/util.py | 42 ++++++++++++++++++++++++++++---- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/src/snakefiles/reports.snakefile b/src/snakefiles/reports.snakefile index 28c494f4..072e58ef 100644 --- a/src/snakefiles/reports.snakefile +++ b/src/snakefiles/reports.snakefile @@ -1,4 +1,4 @@ -from src.snakefiles.util import get_all_compendia, get_all_synonyms_with_drugchemicalconflated +from src.snakefiles.util import get_all_compendia, get_all_synonyms import os from src.reports.compendia_per_file_reports import assert_files_in_directory, \ @@ -13,7 +13,7 @@ conflations_path = config['output_directory'] + '/conflation' compendia_files = get_all_compendia(config) # Expected synonym files. -synonyms_files = get_all_synonyms_with_drugchemicalconflated(config) +synonyms_files = get_all_synonyms(config) # Expected conflation files. conflation_files = config['geneprotein_outputs'] + config['drugchemical_outputs'] diff --git a/src/snakefiles/util.py b/src/snakefiles/util.py index 956cedc0..59534a43 100644 --- a/src/snakefiles/util.py +++ b/src/snakefiles/util.py @@ -14,8 +14,14 @@ def get_all_compendia(config): config['macromolecularcomplex_outputs']) -# List of all the synonym files, except DrugChemicalConflated. -def get_synonyms(config): +def get_all_synonyms(config): + """ + List of all the synonym files, including DrugChemicalConflated. Note that this duplicates synonyms: chemical output + synonyms will be in both the individual chemical outputs and the DrugChemicalConflated file. + + :param config: The Babel config to use. + :return: A list of filenames expected in the `synonyms/` directory. + """ return ( config['anatomy_outputs'] + config['gene_outputs'] + @@ -25,15 +31,41 @@ def get_synonyms(config): config['chemical_outputs'] + config['taxon_outputs'] + config['genefamily_outputs'] + - # config['drugchemicalconflated_synonym_outputs'] + + config['drugchemicalconflated_synonym_outputs'] + config['umls_outputs'] + config['macromolecularcomplex_outputs'] ) -# List of all the synonym files including DrugChemicalConflated instead of the files it -# duplicates. +def get_all_synonyms_except_drugchemicalconflated(config): + """ + List of all the synonym files, except DrugChemicalConflated. + + :param config: The Babel config to use. + :return: A list of filenames expected in the `synonyms/` directory. + """ + return ( + config['anatomy_outputs'] + + config['gene_outputs'] + + config['protein_outputs'] + + config['disease_outputs'] + + config['process_outputs'] + + config['chemical_outputs'] + + config['taxon_outputs'] + + config['genefamily_outputs'] + + # config['drugchemicalconflated_synonym_outputs'] + + config['umls_outputs'] + + config['macromolecularcomplex_outputs'] + ) + + def get_all_synonyms_with_drugchemicalconflated(config): + """ + List of all the synonym files including DrugChemicalConflated instead of the files it duplicates. + + :param config: The Babel config to use. + :return: A list of filenames expected in the `synonyms/` directory. + """ return ( config['anatomy_outputs'] + config['gene_outputs'] +