Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ChEMBL
C
ChEMBL
Main Web Interface
Elasticsearch Proxy API
Commits
4bf8ea9f
Commit
4bf8ea9f
authored
May 26, 2020
by
David Mendez
Browse files
always use alias for index names
parent
34183fd5
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
25 deletions
+25
-25
app/properties_configuration/config/groups.yml
app/properties_configuration/config/groups.yml
+9
-9
app/properties_configuration/config/override.yml
app/properties_configuration/config/override.yml
+9
-9
app/properties_configuration/tests/data/test_default_sorting.yml
...perties_configuration/tests/data/test_default_sorting.yml
+1
-1
app/swagger/swagger.yaml
app/swagger/swagger.yaml
+1
-1
app/usage_statistics/test/test_statistics_saver.py
app/usage_statistics/test/test_statistics_saver.py
+1
-1
functional_tests/specific_tests/fun_test_query_with_context.py
...ional_tests/specific_tests/fun_test_query_with_context.py
+1
-1
functional_tests/specific_tests/fun_test_simple_query.py
functional_tests/specific_tests/fun_test_simple_query.py
+1
-1
utils/try_many_ids_queries.py
utils/try_many_ids_queries.py
+2
-2
No files found.
app/properties_configuration/config/groups.yml
View file @
4bf8ea9f
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'
,
...
...
app/properties_configuration/config/override.yml
View file @
4bf8ea9f
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'
:
...
...
app/properties_configuration/tests/data/test_default_sorting.yml
View file @
4bf8ea9f
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
:
[
...
...
app/swagger/swagger.yaml
View file @
4bf8ea9f
...
...
@@ -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'
...
...
app/usage_statistics/test/test_statistics_saver.py
View file @
4bf8ea9f
...
...
@@ -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
...
...
functional_tests/specific_tests/fun_test_query_with_context.py
View file @
4bf8ea9f
...
...
@@ -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'
,
...
...
functional_tests/specific_tests/fun_test_simple_query.py
View file @
4bf8ea9f
...
...
@@ -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
,
...
...
utils/try_many_ids_queries.py
View file @
4bf8ea9f
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment