forked from enviPath/enviPy
[Feature] Timeseries Pathway view (#319)
**Warning depends on Timeseries feature to be merged** Implements a way to display OECD 301F data on the pathway view. This is mostly a PoC and needs to be improved once the pathway rendering is updated.  Co-authored-by: jebus <lorsbach@envipath.com> Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#319 Co-authored-by: Tobias O <tobias.olenyi@envipath.com> Co-committed-by: Tobias O <tobias.olenyi@envipath.com>
This commit is contained in:
@ -2189,6 +2189,7 @@ class Node(EnviPathModel, AliasMixin, ScenarioMixin):
|
||||
"uncovered_functional_groups": False,
|
||||
},
|
||||
"is_engineered_intermediate": self.kv.get("is_engineered_intermediate", False),
|
||||
"timeseries": self.get_timeseries_data(),
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
@ -2226,6 +2227,13 @@ class Node(EnviPathModel, AliasMixin, ScenarioMixin):
|
||||
def as_svg(self):
|
||||
return IndigoUtils.mol_to_svg(self.default_node_label.smiles)
|
||||
|
||||
def get_timeseries_data(self):
|
||||
for scenario in self.scenarios.all():
|
||||
for ai in scenario.get_additional_information():
|
||||
if ai.__class__.__name__ == "OECD301FTimeSeries":
|
||||
return ai.model_dump(mode="json")
|
||||
return None
|
||||
|
||||
def get_app_domain_assessment_data(self):
|
||||
data = self.kv.get("app_domain_assessment", None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user