Commit c7d0d08c authored by David Mendez's avatar David Mendez
Browse files

Merge branch 'staging' into 'master'

ChEMBL28

See merge request !67
parents a0f20fe8 86a70dfe
......@@ -107,7 +107,7 @@ def get_es_doc(index_name, doc_id):
:return: the dict with the response from es corresponding to the document
"""
cache_key = f'document-{doc_id}'
cache_key = f'document-{index_name}-{doc_id}-{RUN_CONFIG.get("cache_key_suffix")}'
app_logging.debug(f'cache_key: {cache_key}')
equivalent_query = {
......
......@@ -34,7 +34,7 @@ def parse_search(search_term, es_indexes, selected_es_index):
:return: the query to send to elasticsearch based on the search term provided
"""
cache_key = f'{search_term}-{es_indexes}-{selected_es_index}'
cache_key = f'{search_term}-{es_indexes}-{selected_es_index}-{RUN_CONFIG.get("cache_key_suffix")}'
app_logging.debug(f'cache_key: {cache_key}')
cache_response = cache.fail_proof_get(key=cache_key)
......
......@@ -94,7 +94,9 @@ chembl_assay:
'document_chembl_id', '_metadata.document_data.pubmed_id', '_metadata.document_data.doi',
'_metadata.document_data.year', '_metadata.document_data.journal', '_metadata.document_data.volume',
'_metadata.document_data.first_page','_metadata.document_data.last_page', 'assay_parameters',
'assay_classifications_level1', 'assay_classifications_level2', 'assay_classifications_level3']
'assay_classifications_level1', 'assay_classifications_level2', 'assay_classifications_level3',
'variant_sequence.accession', 'variant_sequence.mutation'
]
browser_table:
default: ['assay_chembl_id', 'assay_type', 'description', 'assay_organism', '_metadata.related_compounds.count',
'document_chembl_id', 'bao_label', '_metadata.source.src_description']
......@@ -103,7 +105,8 @@ chembl_assay:
'assay_tissue', 'assay_cell_type', 'assay_subcellular_fraction', '_metadata.document_data.pubmed_id',
'_metadata.document_data.doi', '_metadata.document_data.year', '_metadata.document_data.journal',
'_metadata.document_data.volume', '_metadata.document_data.first_page','_metadata.document_data.last_page',
'assay_parameters', 'assay_classifications_level1', 'assay_classifications_level2', 'assay_classifications_level3']
'assay_parameters', 'assay_classifications_level1', 'assay_classifications_level2', 'assay_classifications_level3',
'variant_sequence.accession', 'variant_sequence.mutation']
assay_parameters:
default: ['assay_parameters_report_card_rows']
chembl_target:
......@@ -203,9 +206,11 @@ chembl_activity:
'ligand_efficiency.sei', 'potential_duplicate', 'assay_chembl_id', 'assay_description',
'assay_type', 'bao_format', 'bao_label', '_metadata.assay_data.assay_organism',
'_metadata.assay_data.tissue_chembl_id', '_metadata.assay_data.assay_tissue',
'_metadata.assay_data.assay_cell_type', '_metadata.assay_data.assay_subcellular_fraction', 'target_chembl_id',
'_metadata.assay_data.assay_cell_type', '_metadata.assay_data.assay_subcellular_fraction',
'_metadata.assay_data.assay_parameters', 'assay_variant_accession', 'assay_variant_mutation', 'target_chembl_id',
'target_pref_name', 'target_organism', '_metadata.target_data.target_type', 'document_chembl_id', 'src_id',
'_metadata.source.src_description', 'document_journal', 'document_year', '_metadata.assay_data.cell_chembl_id']
'_metadata.source.src_description', 'document_journal', 'document_year', '_metadata.assay_data.cell_chembl_id',
'activity_properties']
browser_table:
default: ['molecule_chembl_id', '_metadata.parent_molecule_data.compound_key', 'standard_type', 'standard_relation',
'standard_value', 'standard_units', 'pchembl_value', 'activity_comment', 'assay_chembl_id', 'assay_description',
......@@ -218,4 +223,10 @@ chembl_activity:
'ligand_efficiency.bei', 'ligand_efficiency.le', 'ligand_efficiency.lle', 'ligand_efficiency.sei',
'potential_duplicate', 'assay_type', 'bao_format', '_metadata.assay_data.tissue_chembl_id',
'_metadata.assay_data.assay_tissue', '_metadata.assay_data.assay_cell_type',
'_metadata.assay_data.assay_subcellular_fraction', 'src_id', 'document_journal', 'document_year']
'_metadata.assay_data.assay_subcellular_fraction', '_metadata.assay_data.assay_parameters',
'assay_variant_accession', 'assay_variant_mutation', 'src_id',
'document_journal', 'document_year', 'activity_properties']
chembl_drug_warning_by_parent:
report_card_table:
default: ['drug_warning.warning_type', 'drug_warning.warning_class', 'drug_warning.warning_description',
'drug_warning.where', 'drug_warning.warning_refs']
......@@ -347,4 +347,21 @@ chembl_activity:
'src_id':
label: 'Source ID'
'_metadata.assay_data.cell_chembl_id':
label: 'Cell ChEMBL ID'
\ No newline at end of file
label: 'Cell ChEMBL ID'
'_metadata.assay_data.assay_parameters':
label: 'Assay Parameters'
chembl_drug_warning_by_parent:
'drug_warning.parent_molecule_chembl_id':
label: 'Parent Molecule ChEMBL ID'
'drug_warning.molecule_chembl_id':
label: 'Molecule ChEMBL ID'
'drug_warning.warning_class':
label: 'Warning Class'
'drug_warning.warning_type':
label: 'Warning Type'
'drug_warning.warning_description':
label: 'Description'
'drug_warning.where':
label: 'Where'
'drug_warning.warning_refs':
label: 'References'
......@@ -37,7 +37,7 @@ class FacetsGroupsConfiguration:
:return: the configuration for the facets group
"""
cache_key = f'facets_config_for_group_{index_name}-{group_name}_4'
cache_key = f'facets_config_for_group_{index_name}-{group_name}-{RUN_CONFIG.get("cache_key_suffix")}'
app_logging.debug(f'cache_key: {cache_key}')
cache_response = cache.fail_proof_get(key=cache_key)
......@@ -101,7 +101,7 @@ class FacetsGroupsConfiguration:
:return: a list of all the configured properties among all the groups
"""
cache_key = f'facets_configured_properties_for_{index_name}'
cache_key = f'facets_configured_properties_for_{index_name}-{RUN_CONFIG.get("cache_key_suffix")}'
app_logging.debug(f'cache_key: {cache_key}')
cache_response = cache.fail_proof_get(key=cache_key)
......
......@@ -65,7 +65,7 @@ class GroupConfiguration:
}
"""
cache_key = f'config_for_group_{index_name}-{group_name}'
cache_key = f'config_for_group_{index_name}-{group_name}-{RUN_CONFIG.get("cache_key_suffix")}'
app_logging.debug(f'cache_key: {cache_key}')
cache_response = cache.fail_proof_get(key=cache_key)
......
......@@ -42,7 +42,7 @@ class PropertyConfiguration:
:param prop_id: full path of the property, such as '_metadata.assay_data.assay_subcellular_fraction'
:return: a dict describing the configuration of a property
"""
cache_key = f'config_for_{index_name}-{prop_id}'
cache_key = f'config_for_{index_name}-{prop_id}-{RUN_CONFIG.get("cache_key_suffix")}'
app_logging.debug(f'cache_key: {cache_key}')
cache_response = cache.fail_proof_get(key=cache_key)
......
......@@ -4,13 +4,14 @@ Module that generates the in vivo assay classification tree
from app import cache
from app import app_logging
from app.visualisation_data.shared.tree_generator import TargetHierarchyTreeGenerator
from app.config import RUN_CONFIG
def get_classification_tree():
"""
:return: the in vivo classificacion tree.
"""
cache_key = 'assay_classifications_in_vivo'
cache_key = f'assay_classifications_in_vivo-{RUN_CONFIG.get("cache_key_suffix")}'
app_logging.debug(f'cache_key: {cache_key}')
cache_response = cache.fail_proof_get(key=cache_key)
......
......@@ -4,6 +4,7 @@ Module that generates the go slim target classification
from app import cache
from app import app_logging
from app.visualisation_data.shared.tree_generator import GoSlimTreeGenerator
from app.config import RUN_CONFIG
def get_classification_tree():
......@@ -11,7 +12,7 @@ def get_classification_tree():
:return: the go slim target classification tree
"""
cache_key = 'target_classifications_go_slim_1'
cache_key = f'target_classifications_go_slim_1-{RUN_CONFIG.get("cache_key_suffix")}'
app_logging.debug(f'cache_key: {cache_key}')
cache_response = cache.fail_proof_get(key=cache_key)
......
......@@ -5,13 +5,14 @@ Module that generates the organism taxonomy target classification
from app import cache
from app import app_logging
from app.visualisation_data.shared.tree_generator import TargetHierarchyTreeGenerator
from app.config import RUN_CONFIG
def get_classification_tree():
"""
:return: the organism taxonomy target classification tree
"""
cache_key = 'target_classifications_organism_taxonomy_1'
cache_key = f'target_classifications_organism_taxonomy_1--{RUN_CONFIG.get("cache_key_suffix")}'
app_logging.debug(f'cache_key: {cache_key}')
cache_response = cache.fail_proof_get(key=cache_key)
......
......@@ -4,13 +4,14 @@ Module that generates the protein target classification
from app import cache
from app import app_logging
from app.visualisation_data.shared.tree_generator import TargetHierarchyTreeGenerator
from app.config import RUN_CONFIG
def get_classification_tree():
"""
:return: the protein target classification tree
"""
cache_key = 'target_classifications_protein_class_1'
cache_key = f'target_classifications_protein_class_1-{RUN_CONFIG.get("cache_key_suffix")}'
app_logging.debug(f'cache_key: {cache_key}')
cache_response = cache.fail_proof_get(key=cache_key)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment