Skip to content

Commit

Permalink
adding debug to node creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbie1977 authored May 18, 2024
1 parent 6dc746b commit 93df3ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/uk/ac/ebi/vfb/neo4j/KB_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,13 +548,14 @@ def add_node(self, labels, IRI, attribute_dict=None, allow_duplicates=False):
"""
if attribute_dict is None: attribute_dict = {}
short_form = re.split('[#/]', IRI)[-1]
logging.debug(f"Adding node with labels: {labels}, IRI: {IRI}, short_form: {short_form}, attributes: {attribute_dict}, allow_duplicates: {allow_duplicates}")
statement = "MERGE (n:%s { iri: '%s' }) set n.short_form = '%s' set n:Entity " % (
(':'.join(labels)),
IRI, short_form)
statement += self._set_attributes_from_dict(var='n',
attribute_dict=attribute_dict)
self.statements.append(statement)

logging.debug(f"Generated statement: {statement}")

def update_from_obograph(self, file_path = '', url = '', include_properties=False, commit=True):
"""Update property and class nodes from an OBOgraph file
Expand Down

0 comments on commit 93df3ee

Please sign in to comment.