Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions node_normalizer/model/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ class CurieList(BaseModel):
class Config:
schema_extra = {
"example": {
"curies": ['MESH:D014867', 'NCIT:C34373'],
"curies": ['MESH:D014867', 'NCIT:C34373', 'NCBIGene:1756'],
"conflate": True,
"description": False,
"drug_chemical_conflate": False,
"drug_chemical_conflate": True,
}
}

Expand Down Expand Up @@ -88,4 +88,4 @@ class SetIDs(BaseModel):
""" Query for Set IDs. You can provide a set of named CURIE sets, and we return a response for each one. """
sets: Dict[str, SetIDQuery] = Field(
description="A list of ",
)
)
2 changes: 1 addition & 1 deletion node_normalizer/normalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ async def get_normalized_nodes(
# conflation_types = {"biolink:Gene", "biolink:Protein"}
# conflation_redis = 5

upper_curies = [c.upper() for c in curies]
upper_curies = [c.strip().upper() for c in curies]
canonical_ids = await app.state.eq_id_to_id_db.mget(*upper_curies, encoding='utf-8')
canonical_nonan = [canonical_id for canonical_id in canonical_ids if canonical_id is not None]
info_contents = {}
Expand Down
4 changes: 2 additions & 2 deletions node_normalizer/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,11 @@ async def get_normalized_node_handler(
curie: List[str] = fastapi.Query(
[],
description="List of curies to normalize",
example=["MESH:D014867", "NCIT:C34373"],
example=["MESH:D014867", "NCIT:C34373", "NCBIGene:1756"],
min_items=1,
),
conflate: bool = fastapi.Query(True, description="Whether to apply gene/protein conflation"),
drug_chemical_conflate: bool = fastapi.Query(False, description="Whether to apply drug/chemical conflation"),
drug_chemical_conflate: bool = fastapi.Query(True, description="Whether to apply drug/chemical conflation"),
description: bool = fastapi.Query(False, description="Whether to return curie descriptions when possible"),
individual_types: bool = fastapi.Query(False, description="Whether to return individual types for equivalent identifiers"),
include_taxa: bool = fastapi.Query(True, description="Whether to return taxa for equivalent identifiers"),
Expand Down