Skip to content

Commit

Permalink
feat: relax requirements on minimum information model components to g… (
Browse files Browse the repository at this point in the history
#129)

* feat: relax requirements on minimum information model components to generate nomenclature

* feat: making assay metadata optional
  • Loading branch information
katiestahl authored Sep 12, 2023
1 parent fa4a080 commit e082cb1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions fusor/fusor.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,15 @@ def categorical_fusion(
@staticmethod
def assayed_fusion(
structural_elements: AssayedFusionElements,
causative_event: CausativeEvent,
assay: Assay,
causative_event: Optional[CausativeEvent] = None,
assay: Optional[Assay] = None,
regulatory_element: Optional[RegulatoryElement] = None,
) -> AssayedFusion:
"""Construct an assayed fusion object
:param AssayedFusionElements structural_elements: elements constituting the
fusion
:param Event causative_event: event causing the fusion
:param Assay assay: how knowledge of the fusion was obtained
:param Optional[Event] causative_event: event causing the fusion
:param Optional[Assay] assay: how knowledge of the fusion was obtained
:param Optional[RegulatoryElement] regulatory_element: affected regulatory
elements
:return: Tuple containing optional AssayedFusion if construction successful,
Expand Down
12 changes: 6 additions & 6 deletions fusor/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,10 +651,10 @@ class Assay(BaseModelForbidExtra):
"""Information pertaining to the assay used in identifying the fusion."""

type: Literal["Assay"] = "Assay"
assay_name: StrictStr
assay_id: CURIE
method_uri: CURIE
fusion_detection: Evidence
assay_name: Optional[StrictStr]
assay_id: Optional[CURIE]
method_uri: Optional[CURIE]
fusion_detection: Optional[Evidence]

_get_assay_id_val = validator("assay_id", allow_reuse=True)(return_value)
_get_method_uri_val = validator("method_uri", allow_reuse=True)(return_value)
Expand Down Expand Up @@ -730,8 +730,8 @@ class AssayedFusion(AbstractFusion):

type: Literal[FUSORTypes.ASSAYED_FUSION] = FUSORTypes.ASSAYED_FUSION
structural_elements: AssayedFusionElements
causative_event: CausativeEvent
assay: Assay
causative_event: Optional[CausativeEvent] = None
assay: Optional[Assay] = None

class Config(BaseModelForbidExtra.Config):
"""Configure class."""
Expand Down

0 comments on commit e082cb1

Please sign in to comment.