Commit 4bf8ea9f authored by David Mendez's avatar David Mendez
Browse files

always use alias for index names

parent 34183fd5
chembl_26_molecule:
chembl_molecule:
download:
default: ['molecule_chembl_id', 'pref_name', 'molecule_synonyms', 'molecule_type', 'max_phase',
'molecule_properties.full_mwt', '_metadata.related_targets.count', '_metadata.related_activities.count',
......@@ -83,7 +83,7 @@ chembl_26_molecule:
default: ['helm_notation']
biocomponents:
default: ['molecule_chembl_id', 'biotherapeutic.biocomponents']
chembl_26_assay:
chembl_assay:
download:
default: ['assay_chembl_id', 'assay_type', 'description', 'assay_organism', '_metadata.related_compounds.count',
'_metadata.related_activities.count', 'bao_format', 'bao_label', 'confidence_score',
......@@ -104,7 +104,7 @@ chembl_26_assay:
'assay_parameters', 'assay_classifications_level1', 'assay_classifications_level2', 'assay_classifications_level3']
assay_parameters:
default: ['assay_parameters_report_card_rows']
chembl_26_target:
chembl_target:
download:
default: ['target_chembl_id', 'pref_name', 'uniprot_accessions', 'target_type', 'organism',
'_metadata.related_compounds.count', '_metadata.related_activities.count', 'tax_id', 'species_group_flag']
......@@ -121,7 +121,7 @@ chembl_26_target:
'target_chembl_id', 'pref_name', 'uniprot_accessions', 'target_type', 'organism',
'_metadata.related_compounds.count', '_metadata.related_activities.count']
optional: ['tax_id', 'species_group_flag']
chembl_26_document:
chembl_document:
download:
default: ['document_chembl_id', 'journal_full_title', 'src_id', '_metadata.source', 'title', 'pubmed_id', 'doi',
'patent_id', 'authors', 'year', 'volume', 'issue', 'first_page', 'last_page', 'doc_type', 'abstract',
......@@ -130,7 +130,7 @@ chembl_26_document:
default: ['document_chembl_id', 'journal_full_title', '_metadata.source', 'title', 'pubmed_id', 'doi', 'patent_id',
'authors', 'year', 'volume', 'issue', 'first_page', 'last_page', '_metadata.related_activities.count']
optional: ['src_id', 'abstract', '_metadata.related_compounds.count', '_metadata.related_targets.count']
chembl_26_cell_line:
chembl_cell_line:
download:
default: ['cell_chembl_id', 'cell_name', 'cell_description', 'cell_source_organism', 'cell_source_tissue',
'cell_source_tax_id', 'clo_id', 'efo_id', 'cellosaurus_id', 'cl_lincs_id', '_metadata.related_compounds.count',
......@@ -140,14 +140,14 @@ chembl_26_cell_line:
'_metadata.related_activities.count']
optional: ['cell_source_tax_id', 'clo_id', 'efo_id', 'cellosaurus_id', 'cl_lincs_id',
'_metadata.related_compounds.count']
chembl_26_tissue:
chembl_tissue:
download:
default: ['tissue_chembl_id', 'pref_name', 'uberon_id', 'efo_id', 'bto_id', 'caloha_id',
'_metadata.related_compounds.count', '_metadata.related_activities.count']
browser_table:
default: ['tissue_chembl_id', 'pref_name', 'uberon_id', 'efo_id', '_metadata.related_activities.count']
optional: ['bto_id', 'caloha_id', '_metadata.related_compounds.count']
chembl_26_drug_indication_by_parent:
chembl_drug_indication_by_parent:
download:
default: ['parent_molecule.molecule_chembl_id', 'parent_molecule.pref_name', 'parent_molecule.molecule_type',
'drug_indication.max_phase_for_ind', 'parent_molecule.first_approval', 'drug_indication.mesh_id',
......@@ -163,7 +163,7 @@ chembl_26_drug_indication_by_parent:
report_card_table:
default: ['drug_indication.mesh_id', 'drug_indication.mesh_heading', 'efo_ids', 'efo_terms',
'drug_indication.max_phase_for_ind', 'parent_molecule.first_approval', 'drug_indication.indication_refs']
chembl_26_mechanism_by_parent_target:
chembl_mechanism_by_parent_target:
download:
default: ['parent_molecule.molecule_chembl_id', 'parent_molecule.pref_name', 'parent_molecule.molecule_type',
'mechanism_of_action.max_phase', 'parent_molecule.first_approval', 'parent_molecule.usan_stem',
......@@ -189,7 +189,7 @@ chembl_26_mechanism_by_parent_target:
default: ['parent_molecule.molecule_chembl_id', 'parent_molecule.pref_name', 'parent_molecule.molecule_type',
'mechanism_of_action.max_phase', 'parent_molecule.first_approval', 'parent_molecule.usan_stem',
'mechanism_of_action.mechanism_refs']
chembl_26_activity:
chembl_activity:
download:
default: ['molecule_chembl_id', 'molecule_pref_name', '_metadata.parent_molecule_data.max_phase',
'_metadata.parent_molecule_data.full_mwt', '_metadata.parent_molecule_data.num_ro5_violations',
......
chembl_26_molecule:
chembl_molecule:
'molecule_properties.full_mwt':
label: 'Molecular Weight'
label_mini: 'Mol. Wt.'
......@@ -109,7 +109,7 @@ chembl_26_molecule:
type: 'string'
aggregatable: false
sortable: true
chembl_26_assay:
chembl_assay:
'_metadata.related_compounds.count':
label: 'Compounds'
label_mini: 'Compounds'
......@@ -155,7 +155,7 @@ chembl_26_assay:
'assay_classifications_level3':
based_on: 'assay_classifications'
label: 'Assay Classification L3'
chembl_26_target:
chembl_target:
'pref_name':
label: 'Name'
'uniprot_accessions':
......@@ -203,7 +203,7 @@ chembl_26_target:
type: 'double'
aggregatable: false
sortable: true
chembl_26_document:
chembl_document:
'journal_full_title':
label: 'Journal'
'src_id':
......@@ -230,7 +230,7 @@ chembl_26_document:
label: 'Targets'
'_metadata.related_activities.count':
label: 'Activities'
chembl_26_cell_line:
chembl_cell_line:
'clo_id':
label: 'CLO ID'
'cl_lincs_id':
......@@ -239,14 +239,14 @@ chembl_26_cell_line:
label: 'Compounds'
'_metadata.related_activities.count':
label: 'Activities'
chembl_26_tissue:
chembl_tissue:
'bto_id':
label: 'BTO ID'
'_metadata.related_compounds.count':
label: 'Compounds'
'_metadata.related_activities.count':
label: 'Activities'
chembl_26_drug_indication_by_parent:
chembl_drug_indication_by_parent:
'drug_indication.max_phase_for_ind':
label: 'Max Phase for Indication'
'parent_molecule.first_approval':
......@@ -265,7 +265,7 @@ chembl_26_drug_indication_by_parent:
label: 'References'
'parent_molecule._metadata.drug.drug_data.synonyms':
label: 'Synonyms'
chembl_26_mechanism_by_parent_target:
chembl_mechanism_by_parent_target:
'mechanism_of_action.max_phase':
label: 'Max Phase'
'parent_molecule.first_approval':
......@@ -305,7 +305,7 @@ chembl_26_mechanism_by_parent_target:
'drug_atc_codes_level_1':
based_on: 'parent_molecule._metadata.atc_classifications'
label: 'Level 1 ATC Codes'
chembl_26_activity:
chembl_activity:
'_metadata.parent_molecule_data.max_phase':
label: 'Molecule Max Phase'
'_metadata.parent_molecule_data.full_mwt':
......
chembl_26_molecule:
chembl_molecule:
# this is as elasticsearch would receve the object to sort the dataset
# see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html
sorted_table: [
......
......@@ -36,7 +36,7 @@ paths:
description: 'name of the index to query'
required: true
type: 'string'
default: 'chembl_26_molecule'
default: 'chembl_molecule'
- name: 'es_query'
in: 'formData'
description: 'stringifyied version of the query to send to elasticsearch'
......
......@@ -41,7 +41,7 @@ class TestStatisticsSaver(unittest.TestCase):
}
}
es_index = 'chembl_26_molecule'
es_index = 'chembl_molecule'
es_request_digest = 'somedigest'
is_cached = True
request_date = datetime.now().timestamp() * 1000
......
......@@ -47,7 +47,7 @@ def run_test(server_base_url, delayed_jobs_server_base_path):
}
payload = {
'index_name': 'chembl_26_molecule',
'index_name': 'chembl_molecule',
'es_query': json.dumps(es_query),
'context_obj': json.dumps(context_obj),
'id_property': 'molecule_chembl_id',
......
......@@ -23,7 +23,7 @@ def run_test(server_base_url, delayed_jobs_server_base_path):
url = utils.get_url_for_get_es_data(server_base_url)
print('url: ', url)
index_name = 'chembl_26_molecule'
index_name = 'chembl_molecule'
print('index_name: ', index_name)
es_query = {
"size": 24,
......
......@@ -61,7 +61,7 @@ def run():
print('With {} compounds'.format(num_compounds))
start_time = time.time()
res = es_conn.search(index="chembl_26_activity", body={"query": terms_query})
res = es_conn.search(index="chembl_activity", body={"query": terms_query})
end_time = time.time()
time_taken_terms = end_time - start_time
......@@ -71,7 +71,7 @@ def run():
script_query = get_script_query(ids)
start_time = time.time()
res = es_conn.search(index="chembl_26_activity", body={"query": script_query})
res = es_conn.search(index="chembl_activity", body={"query": script_query})
end_time = time.time()
time_taken_script = end_time - start_time
......
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