Skip to content

Commit

Permalink
Upgrade gocamgen to its new home in ontobio
Browse files Browse the repository at this point in the history
  • Loading branch information
dustine32 committed Jun 18, 2021
1 parent 755091d commit beade49
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions entity_models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import abc
from gocamgen.gocamgen import GoCamModel
from ontobio.rdfgen.gocamgen import gocamgen
from naming_conventions import NamingConvention
from rdflib.term import URIRef, Literal
from rdflib.namespace import RDFS
Expand Down Expand Up @@ -35,7 +35,7 @@ def __str__(self):
return f"{self.id} - {self.name}"

@abc.abstractmethod
def declare(self, model: GoCamModel):
def declare(self, model: gocamgen.GoCamModel):
return


Expand Down
6 changes: 3 additions & 3 deletions pathway_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from prefixcommons.curie_util import expand_uri
from entity_factories import SignorEntityFactory
from entity_models import SignorEntity
from gocamgen.gocamgen import GoCamEvidence
from ontobio.rdfgen.gocamgen import gocamgen
from util import OntologyTerm

ro = OboRO()
Expand Down Expand Up @@ -182,7 +182,7 @@ def gocam_evidence(self, eco_code):
date = str(datetime.date.today())
if self.annotator:
contributors = [self.annotator]
return GoCamEvidence(eco_code, ["PMID:" + pmid for pmid in self.references],
return gocamgen.GoCamEvidence(eco_code, ["PMID:" + pmid for pmid in self.references],
date=date, contributors=contributors)

def __str__(self):
Expand All @@ -191,7 +191,7 @@ def __str__(self):
def print(self):
print(self)

def declare_a_to_mechanism(self, model, eco_code):
def declare_a_to_mechanism(self, model: gocamgen.GoCamModel, eco_code):
# Declare entity A and mechanism
self.declare_a(model)
if self.a_is_small_mol():
Expand Down
4 changes: 2 additions & 2 deletions pathway_importer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from gocamgen.gocamgen import GoCamModel, GoCamEvidence
from ontobio.rdfgen.gocamgen import gocamgen
from ontobio.vocabulary.relations import OboRO
from rdflib.term import URIRef
from rdflib.namespace import Namespace, OWL
Expand Down Expand Up @@ -74,7 +74,7 @@ def pathway_connection_filter_protein_binding(p_connections):


def generate_model(filename, title):
model = GoCamModel(title)
model = gocamgen.GoCamModel(title)

p_connections = PathwayConnectionSet.parse_file(filename)
linenum = 1
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
gocamgen==0.0.5
requests==2.18.4
ontobio==2.7.6

0 comments on commit beade49

Please sign in to comment.