Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start on kidney template #150

Merged
merged 5 commits into from
Dec 22, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update kidney.py template file
Justin Reese committed Jul 10, 2023
commit 6e4fb874856851a7fe253ec9d9505294bb8a6db7
38 changes: 3 additions & 35 deletions src/ontogpt/templates/kidney.py
Original file line number Diff line number Diff line change
@@ -28,13 +28,6 @@ class NullDataOptions(str, Enum):



class GeneMolecularActivityRelationship(ConfiguredBaseModel):

gene: Optional[str] = Field(None)
molecular_activity: Optional[str] = Field(None)



class ExtractionResult(ConfiguredBaseModel):
"""
A result of extracting knowledge on text
@@ -56,36 +49,14 @@ class NamedEntity(ConfiguredBaseModel):



class BiologicalProcess(NamedEntity):

label: Optional[str] = Field(None, description="""the name of the biological process""")
description: Optional[str] = Field(None, description="""a textual description of the biological process""")
synonyms: Optional[List[str]] = Field(default_factory=list, description="""alternative names of the biological process""")
subclass_of: Optional[str] = Field(None, description="""the category to which this biological process belongs""")
inputs: Optional[List[str]] = Field(default_factory=list, description="""the inputs of the biological process""")
outputs: Optional[List[str]] = Field(default_factory=list, description="""the outputs of the biological process""")
steps: Optional[List[str]] = Field(default_factory=list, description="""the steps involved in this biological process""")
genes: Optional[List[str]] = Field(default_factory=list)
gene_activities: Optional[List[GeneMolecularActivityRelationship]] = Field(default_factory=list, description="""semicolon-separated list of gene to molecular activity relationships""")
id: Optional[str] = Field(None, description="""A unique identifier for the named entity""")



class Gene(NamedEntity):

id: Optional[str] = Field(None, description="""A unique identifier for the named entity""")
label: Optional[str] = Field(None, description="""The label (name) of the named thing""")



class MolecularActivity(NamedEntity):
class CellType(NamedEntity):

id: Optional[str] = Field(None, description="""A unique identifier for the named entity""")
label: Optional[str] = Field(None, description="""The label (name) of the named thing""")



class ChemicalEntity(NamedEntity):
class Gene(NamedEntity):

id: Optional[str] = Field(None, description="""A unique identifier for the named entity""")
label: Optional[str] = Field(None, description="""The label (name) of the named thing""")
@@ -146,13 +117,10 @@ class AnnotatorResult(ConfiguredBaseModel):

# Update forward refs
# see https://pydantic-docs.helpmanual.io/usage/postponed_annotations/
GeneMolecularActivityRelationship.update_forward_refs()
ExtractionResult.update_forward_refs()
NamedEntity.update_forward_refs()
BiologicalProcess.update_forward_refs()
CellType.update_forward_refs()
Gene.update_forward_refs()
MolecularActivity.update_forward_refs()
ChemicalEntity.update_forward_refs()
CompoundExpression.update_forward_refs()
Triple.update_forward_refs()
TextWithTriples.update_forward_refs()