Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes #253

Merged
merged 2 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/babel-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/snakefiles/reports.snakefile
Original file line number Diff line number Diff line change
@@ -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, \
Expand All @@ -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']
Expand Down
42 changes: 37 additions & 5 deletions src/snakefiles/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'] +
Expand All @@ -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'] +
Expand Down