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

Finish up AssocGoCamModel.translate() #8

Closed
dustine32 opened this issue Jan 15, 2019 · 2 comments
Closed

Finish up AssocGoCamModel.translate() #8

dustine32 opened this issue Jan 15, 2019 · 2 comments
Assignees

Comments

@dustine32
Copy link
Collaborator

The code I have already written for AssocGoCamModel looks like it should take a list of ontobio associations and generate a single GO-CAM model, though I seem to have left AssocGoCamModel.translate() in an unfinished state:

>>> model.translate()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ebertdu/go/gocamgen/gocamgen/gocamgen.py", line 257, in translate
    aspect_triples.append(self.emit(term, ENABLED_BY, annoton.enabled_by))
AttributeError: 'AssocGoCamModel' object has no attribute 'emit'

Fixing this method and then model.write() should get us a model we can load to Noctua for viewing.

@dustine32 dustine32 self-assigned this Jan 23, 2019
dustine32 added a commit that referenced this issue Jan 23, 2019
@dustine32
Copy link
Collaborator Author

I finished model.translate() to the point where it will create annotons from GPAD lines using the same logic from ontobio/rdfgen, though (except for extensions) similar to Paul's rules.

One issue I dealt with was retrieving the aspect from the term since the existing logic (stolen from rdfgen) needed this. Since GPAD doesn't contain this aspect column like GAF does, GPAD could not be translated directly in ontobio/rdfgen. For now, I created a PR in ontobio for getting the GO aspect from a term. This PR's same code is currently in gocamgen but I'll remove it once the PR is merged and the ontobio package gets updated.

A TODO in rdfgen is to utilize the GPAD relation field, but this can be discussed when further defining translation rules and then implemented either here or in ontobio.

@dustine32
Copy link
Collaborator Author

dustine32 commented Jan 29, 2019

Since the PR has been incorporated into ontobio 1.7.0, a couple more things before closing this:

  • Update ontobio in requirements.txt to 1.7.0
  • Remove redundant go_aspect code from gocamgen.

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

No branches or pull requests

1 participant