Skip to content

Commit

Permalink
Add closurizer expansion slots for qualifiers field
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinschaper committed Oct 27, 2023
1 parent 3b7ac95 commit 5a5899d
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
26 changes: 26 additions & 0 deletions backend/src/monarch_py/datamodels/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,19 @@ class Association(ConfiguredBaseModel):
onset_qualifier: Optional[str] = Field(None)
sex_qualifier: Optional[str] = Field(None)
stage_qualifier: Optional[str] = Field(None)
qualifiers_label: Optional[str] = Field(None, description="""The name of the frequency_qualifier entity""")
qualifiers_namespace: Optional[str] = Field(
None, description="""The namespace/prefix of the frequency_qualifier entity"""
)
qualifiers_category: Optional[str] = Field(None, description="""The category of the frequency_qualifier entity""")
qualifiers_closure: Optional[List[str]] = Field(
default_factory=list,
description="""Field containing frequency_qualifier id and the ids of all of it's ancestors""",
)
qualifiers_closure_label: Optional[List[str]] = Field(
default_factory=list,
description="""Field containing frequency_qualifier name and the names of all of it's ancestors""",
)
frequency_qualifier_label: Optional[str] = Field(None, description="""The name of the frequency_qualifier entity""")
frequency_qualifier_namespace: Optional[str] = Field(
None, description="""The namespace/prefix of the frequency_qualifier entity"""
Expand Down Expand Up @@ -265,6 +278,19 @@ class DirectionalAssociation(Association):
onset_qualifier: Optional[str] = Field(None)
sex_qualifier: Optional[str] = Field(None)
stage_qualifier: Optional[str] = Field(None)
qualifiers_label: Optional[str] = Field(None, description="""The name of the frequency_qualifier entity""")
qualifiers_namespace: Optional[str] = Field(
None, description="""The namespace/prefix of the frequency_qualifier entity"""
)
qualifiers_category: Optional[str] = Field(None, description="""The category of the frequency_qualifier entity""")
qualifiers_closure: Optional[List[str]] = Field(
default_factory=list,
description="""Field containing frequency_qualifier id and the ids of all of it's ancestors""",
)
qualifiers_closure_label: Optional[List[str]] = Field(
default_factory=list,
description="""Field containing frequency_qualifier name and the names of all of it's ancestors""",
)
frequency_qualifier_label: Optional[str] = Field(None, description="""The name of the frequency_qualifier entity""")
frequency_qualifier_namespace: Optional[str] = Field(
None, description="""The namespace/prefix of the frequency_qualifier entity"""
Expand Down
18 changes: 18 additions & 0 deletions backend/src/monarch_py/datamodels/model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,24 @@ slots:
is_a: in_taxon
object_taxon_label:
is_a: in_taxon_label

# this whole block will be renamed to qualifer_ after we bring in the next biolink model release
qualifiers_label:
is_a: name
description: The name of the frequency_qualifier entity
qualifiers_namespace:
range: string
description: The namespace/prefix of the frequency_qualifier entity
qualifiers_category:
is_a: category
description: The category of the frequency_qualifier entity
qualifiers_closure:
multivalued: true
description: Field containing frequency_qualifier id and the ids of all of it's ancestors
qualifiers_closure_label:
multivalued: true
description: Field containing frequency_qualifier name and the names of all of it's ancestors

frequency_qualifier_label:
is_a: name
description: The name of the frequency_qualifier entity
Expand Down
22 changes: 21 additions & 1 deletion frontend/src/api/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ export interface Association {
sex_qualifier?: string,
stage_qualifier?: string,
/** The name of the frequency_qualifier entity */
qualifiers_label?: string,
/** The namespace/prefix of the frequency_qualifier entity */
qualifiers_namespace?: string,
/** The category of the frequency_qualifier entity */
qualifiers_category?: string,
/** Field containing frequency_qualifier id and the ids of all of it's ancestors */
qualifiers_closure?: string[],
/** Field containing frequency_qualifier name and the names of all of it's ancestors */
qualifiers_closure_label?: string[],
/** The name of the frequency_qualifier entity */
frequency_qualifier_label?: string,
/** The namespace/prefix of the frequency_qualifier entity */
frequency_qualifier_namespace?: string,
Expand Down Expand Up @@ -235,6 +245,16 @@ export interface DirectionalAssociation extends Association {
sex_qualifier?: string,
stage_qualifier?: string,
/** The name of the frequency_qualifier entity */
qualifiers_label?: string,
/** The namespace/prefix of the frequency_qualifier entity */
qualifiers_namespace?: string,
/** The category of the frequency_qualifier entity */
qualifiers_category?: string,
/** Field containing frequency_qualifier id and the ids of all of it's ancestors */
qualifiers_closure?: string[],
/** Field containing frequency_qualifier name and the names of all of it's ancestors */
qualifiers_closure_label?: string[],
/** The name of the frequency_qualifier entity */
frequency_qualifier_label?: string,
/** The namespace/prefix of the frequency_qualifier entity */
frequency_qualifier_namespace?: string,
Expand Down Expand Up @@ -481,7 +501,7 @@ export interface TermPairwiseSimilarity extends PairwiseSimilarity {
cosine_similarity?: number,
dice_similarity?: string,
/** the geometric mean of the jaccard similarity and the information content */
phenodigm_score?: string,
phenodigm_score?: number,
};
/**
* A simple pairwise similarity between two sets of concepts/terms
Expand Down

0 comments on commit 5a5899d

Please sign in to comment.