Skip to content

Commit

Permalink
resolving returns also the hasleafregionpart attribute of the resource
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoRicardi committed Feb 7, 2024
1 parent 1a8eefc commit 02da102
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
delineatedBy: x.delineatedBy if hasattr(x, "delineatedBy") else None
hasLayerLocationPhenotype: x.hasLayerLocationPhenotype if hasattr(x, "hasLayerLocationPhenotype") else None
representedInAnnotation: x.representedInAnnotation if hasattr(x, "representedInAnnotation") else None
hasLeafRegionPart: x.hasLeafRegionPart if hasattr(x, "hasLeafRegionPart") else None
isPartOf: x.isPartOf if hasattr(x, "isPartOf") else None
isLayerPartOf: x.isLayerPartOf if hasattr(x, "isLayerPartOf") else None
units: x.units if hasattr(x, "units") else None
}
}
4 changes: 4 additions & 0 deletions kgforge/specializations/resolvers/ontology_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def _resolve(self, text: Union[str, List[str]], target: Optional[str], type: Opt
delineatedBy ?delineatedBy ;
hasLayerLocationPhenotype ?hasLayerLocationPhenotype ;
representedInAnnotation ?representedInAnnotation ;
hasLeafRegionPart ?hasLeafRegionPart ;
isPartOf ?isPartOf ;
isLayerPartOf ?isLayerPartOf .
}} WHERE {{
Expand Down Expand Up @@ -104,6 +105,9 @@ def _resolve(self, text: Union[str, List[str]], target: Optional[str], type: Opt
?id representedInAnnotation ?representedInAnnotation .
}}
OPTIONAL {{
?id hasLeafRegionPart ?hasLeafRegionPart .
}}
OPTIONAL {{
?id isPartOf ?isPartOf .
}}
OPTIONAL {{
Expand Down

0 comments on commit 02da102

Please sign in to comment.