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

Use root-types to control input/output associations #34

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

pkalita-lbl
Copy link
Contributor

Fixes #29

When looking at GO-CAMs on NDEx, we noticed a lot of them had nodes (representing Activity instances) connected by both a direct regulation edge and a has input/output edge. See the linked issue for an example.

While we found the issue while looking at a rendering of the CX2 representation of GO-CAMs, these changes actually address the issue in the MinervaWrapper class where we convert from Minerva's JSON format into the gocam-py data model.

The logic here is to make more use of the root-types field in the Minerva format. In particular, these changes reflect a bit of pathway widget logic by checking that the object of a has input/output relationship has CHEBI:24431 (chemical entity) as a root type, but not CHEBI:33695 (information biomacromolecule) before adding a MoleculeAssociation. This is supported by tracking all of an individual's root-types (previously only one of them was tracked).

With these changes in place, no additional changes to the CX2 conversion process were needed. Here's an example of what the rendered CX2 for the example in #29 looks like with these changes after doing the full Minerva -> Model -> CX2:

image

Copy link

github-actions bot commented Dec 5, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://geneontology.github.io/gocam-py/pr-preview/pr-34/
on branch gh-pages at 2024-12-05 01:07 UTC

@pkalita-lbl
Copy link
Contributor Author

P.S. Sorry the diff is a bit messy because of my compulsion to replace variables like s with subject 😂

@pkalita-lbl pkalita-lbl requested a review from cmungall December 5, 2024 01:09
@pkalita-lbl pkalita-lbl merged commit 4c92293 into main Dec 9, 2024
3 checks passed
@pkalita-lbl pkalita-lbl deleted the issue-29-root-type-handling branch December 9, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not show input/output relationship edges when other regulation edges exist
1 participant