Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ChEBI Elasticsearch
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ChEMBL
ChEBI
ChEBI-2.0
ChEBI Elasticsearch
Merge requests
!16
[carlosm] Add the adoption of chemrof in chebi.owl for elasticsearch indexation
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
[carlosm] Add the adoption of chemrof in chebi.owl for elasticsearch indexation
chemrof
into
dev
Overview
0
Commits
1
Pipelines
0
Changes
3
Merged
Carlos Andres Moreno Velez
requested to merge
chemrof
into
dev
3 months ago
Overview
0
Commits
1
Pipelines
0
Changes
3
Expand
0
0
Merge request reports
Compare
dev
dev (base)
and
latest version
latest version
b6826665
1 commit,
3 months ago
3 files
+
19
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
helper_functions/ontology_functions.py
+
17
−
0
Options
@@ -14,6 +14,23 @@ class OntologyVariants(StrEnum):
TEST
=
"
_for_testing
"
class
AnnotationPropertyEquivalences
(
StrEnum
):
"""
ChEBI ontology uses chemrof for annotation properties. We are assigning a simple value used by elasticsearch
to create the documents.
<value_in_chemrof> = <simple_value_used_by_elasticsearch>
"""
generalized_empirical_formula
=
"
formula
"
inchi_string
=
"
inchi
"
inchi_key_string
=
"
inchikey
"
wurcs_representation
=
"
wurcs
"
smiles_string
=
"
smiles
"
charge
=
"
charge
"
mass
=
"
mass
"
monoisotopic_mass
=
"
monoisotopicmass
"
def
get_ontology
(
variant
:
OntologyVariants
,
gzip
:
bool
=
True
)
->
pt
.
ontology
.
Ontology
:
warnings
.
filterwarnings
(
"
ignore
"
,
category
=
pt
.
warnings
.
NotImplementedWarning
,
module
=
"
pronto
"
)
configuration_ontology
=
read_configuration
().
get
(
"
ontology
"
)