-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from helxplatform/release/2.1
Release 2.1.0
- v2.13.5
- v2.13.4
- v2.13.3
- v2.13.2
- v2.13.1
- v2.13.0
- v2.12.0
- v2.11.2
- v2.11.1
- v2.11.0
- v2.10.3-rc
- v2.10.2
- v2.10.1
- v2.10.0
- v2.9.8
- v2.9.7
- v2.9.6
- v2.9.6dev
- v2.9.5
- v2.9.4
- v2.9.3
- v2.9.2
- v2.9.1
- v2.9.1rc
- v2.9.1dev
- v2.9.0
- v2.9.rc
- v2.8.0
- v2.8.rc0
- release-2.1.0
- 2.13.5
- 2.13.4
- 2.13.3
- 2.13.2
- 2.13.1
- 2.13.0
- 2.12.0
- 2.11.2
- 2.11.1
- 2.11.0
- 2.10.2
- 2.10.1
- 2.10.0
- 2.7.0
- 2.7.rc0
- 2.6.0
- 2.6.rc0
- 2.5.0
- 2.5.rc0
- 2.4.0
- 2.4.rc0
- 2.3.0
- 2.2.0
- 2.2.rc0
Showing
40 changed files
with
1,379 additions
and
1,121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,5 +156,4 @@ variable_file.json | |
monarch_results.txt | ||
anno_fails.txt | ||
data/elastic/ | ||
data/neo4j/ | ||
crawl/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from ._version import __version__ | ||
from ._version import __version__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "2.0.1" | ||
__version__ = "2.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,96 @@ | ||
import os | ||
import dug.tranql as tql | ||
|
||
# Redis cache config | ||
redis_host = os.environ.get('REDIS_HOST', 'localhost') | ||
redis_port = os.environ.get('REDIS_PORT', 6379) | ||
redis_password = os.environ.get('REDIS_PASSWORD', '') | ||
|
||
# ElasticSearch config options | ||
elasticsearch_host = os.environ.get('ELASTIC_API_HOST', 'localhost') | ||
elasticsearch_port = os.environ.get('ELASTIC_API_PORT', 9200) | ||
|
||
# Preprocessor config that will be passed to annotate.Preprocessor constructor | ||
preprocessor = { | ||
"debreviator": { | ||
"BMI": "body mass index" | ||
}, | ||
"stopwords": ["the"] | ||
} | ||
|
||
# Annotator config that will be passed to annotate.Annotator constructor | ||
annotator = { | ||
'url': "https://api.monarchinitiative.org/api/nlp/annotate/entities?min_length=4&longest_only=false&include_abbreviation=false&include_acronym=false&include_numbers=false&content=" | ||
} | ||
|
||
# Normalizer config that will be passed to annotate.Normalizer constructor | ||
normalizer = { | ||
'url': "https://nodenormalization-sri.renci.org/get_normalized_nodes?curie=" | ||
} | ||
|
||
# Synonym service config that will be passed to annotate.SynonymHelper constructor | ||
synonym_service = { | ||
'url': "https://onto.renci.org/synonyms/" | ||
} | ||
|
||
# Ontology metadata helper config that will be passed to annotate.OntologyHelper constructor | ||
ontology_helper = { | ||
'url': "https://api.monarchinitiative.org/api/bioentity/" | ||
} | ||
|
||
# Redlist of identifiers not to expand via TranQL | ||
tranql_exclude_identifiers = ["CHEBI:17336"] | ||
|
||
# TranQL queries used to expand identifiers | ||
tranql_source = "/graph/gamma/quick" | ||
tranql_queries = { | ||
"disease": tql.QueryFactory(["disease", "phenotypic_feature"], tranql_source), | ||
"pheno": tql.QueryFactory(["phenotypic_feature", "disease"], tranql_source), | ||
"anat": tql.QueryFactory(["disease", "anatomical_entity"], tranql_source), | ||
"chem_to_disease": tql.QueryFactory(["chemical_substance", "disease"], tranql_source), | ||
"phen_to_anat": tql.QueryFactory(["phenotypic_feature", "anatomical_entity"], tranql_source), | ||
#"anat_to_disease": tql.QueryFactory(["anatomical_entity", "disease"], tranql_source), | ||
#"anat_to_pheno": tql.QueryFactory(["anatomical_entity", "phenotypic_feature"], tranql_source) | ||
} | ||
|
||
concept_expander = { | ||
'url': "https://tranql.renci.org/tranql/query?dynamic_id_resolution=true&asynchronous=false", | ||
'min_tranql_score': 0.0 | ||
} | ||
|
||
# List of ontology types that can be used even if they fail normalization | ||
ontology_greenlist = ["PATO", "CHEBI", "MONDO", "UBERON", "HP", "MESH", "UMLS"] | ||
|
||
from dataclasses import dataclass, field | ||
|
||
|
||
TRANQL_SOURCE: str = "/graph/gamma/quick" | ||
|
||
|
||
@dataclass | ||
class Config: | ||
""" | ||
TODO: Populate description | ||
""" | ||
elastic_password: str = "changeme" | ||
redis_password: str = "changeme" | ||
|
||
elastic_host: str = "elasticsearch" | ||
elastic_port: int = 9200 | ||
elastic_username: str = "elastic" | ||
|
||
redis_host: str = "redis" | ||
redis_port: int = 6379 | ||
|
||
nboost_host: str = "nboost" | ||
nboost_port: int = 8000 | ||
|
||
# Preprocessor config that will be passed to annotate.Preprocessor constructor | ||
preprocessor: dict = field(default_factory=lambda: { | ||
"debreviator": { | ||
"BMI": "body mass index" | ||
}, | ||
"stopwords": ["the"] | ||
}) | ||
|
||
# Annotator config that will be passed to annotate.Annotator constructor | ||
annotator: dict = field(default_factory=lambda: { | ||
"url": "https://api.monarchinitiative.org/api/nlp/annotate/entities?min_length=4&longest_only=false&include_abbreviation=false&include_acronym=false&include_numbers=false&content=" | ||
}) | ||
|
||
# Normalizer config that will be passed to annotate.Normalizer constructor | ||
normalizer: dict = field(default_factory=lambda: { | ||
"url": "https://nodenormalization-sri.renci.org/get_normalized_nodes?curie=" | ||
}) | ||
|
||
# Synonym service config that will be passed to annotate.SynonymHelper constructor | ||
synonym_service: dict = field(default_factory=lambda: { | ||
"url": "https://onto.renci.org/synonyms/" | ||
}) | ||
|
||
# Ontology metadata helper config that will be passed to annotate.OntologyHelper constructor | ||
ontology_helper: dict = field(default_factory=lambda: { | ||
"url": "https://api.monarchinitiative.org/api/bioentity/" | ||
}) | ||
|
||
# Redlist of identifiers not to expand via TranQL | ||
tranql_exclude_identifiers: list = field(default_factory=lambda: ["CHEBI:17336"]) | ||
|
||
tranql_queries: dict = field(default_factory=lambda: { | ||
"disease": ["disease", "phenotypic_feature"], | ||
"pheno": ["phenotypic_feature", "disease"], | ||
"anat": ["disease", "anatomical_entity"], | ||
"chem_to_disease": ["chemical_substance", "disease"], | ||
"phen_to_anat": ["phenotypic_feature", "anatomical_entity"], | ||
}) | ||
|
||
|
||
concept_expander: dict = field(default_factory=lambda: { | ||
"url": "https://tranql.renci.org/tranql/query?dynamic_id_resolution=true&asynchronous=false", | ||
"min_tranql_score": 0.0 | ||
}) | ||
|
||
# List of ontology types that can be used even if they fail normalization | ||
ontology_greenlist: list = field(default_factory=lambda: ["PATO", "CHEBI", "MONDO", "UBERON", "HP", "MESH", "UMLS"]) | ||
|
||
@classmethod | ||
def from_env(cls): | ||
env_vars = { | ||
"elastic_host": "ELASTIC_API_HOST", | ||
"elastic_port": "ELASTIC_API_PORT", | ||
"elastic_username": "ELASTIC_USERNAME", | ||
"elastic_password": "ELASTIC_PASSWORD", | ||
"redis_host": "REDIS_HOST", | ||
"redis_port": "REDIS_PORT", | ||
"redis_password": "REDIS_PASSWORD", | ||
"nboost_host": "NBOOST_API_HOST", | ||
"nboost_port": "NBOOST_API_PORT" | ||
} | ||
|
||
kwargs = {} | ||
|
||
for kwarg, env_var in env_vars.items(): | ||
env_value = os.environ.get(env_var) | ||
if env_value: | ||
kwargs[kwarg] = env_value | ||
|
||
return cls(**kwargs) |
Oops, something went wrong.