From 762ee76b7185e0e0061d3870019ac6cf305489e9 Mon Sep 17 00:00:00 2001 From: 6br Date: Sun, 26 Jul 2020 14:08:47 +0900 Subject: [PATCH] Add logger info --- matrixcomponent/PangenomeSchematic.py | 5 ++++- matrixcomponent/ontology.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/matrixcomponent/PangenomeSchematic.py b/matrixcomponent/PangenomeSchematic.py index 38c0054..7832ca5 100644 --- a/matrixcomponent/PangenomeSchematic.py +++ b/matrixcomponent/PangenomeSchematic.py @@ -124,15 +124,18 @@ def write_rdf(schematic, ontology_output_path): if len(link.participants): link_counter = link_counter + 1 olink = olink_dict[link_counter] - assert link.upstream in obin_dict == link.downstream in obin_dict, "upstream: {0}, downstream {1}".format(link.upstream, link.downstream) if link.upstream in obin_dict: from_bin = obin_dict[link.upstream] olink.departure = from_bin.ns_term() + else: + LOGGER.info(f"No upstream {link.upstream}") if lin_k.downstream in obin_dict: tobin = obin_dict[link.downstream] olink.arrival = to_bin.ns_term() + else: + LOGGER.info(f"No downstream {link.downstream}") olink.paths = [schematic.path_names[k] for k in link.participants] olink.linkZoomLevel = zoom_level.ns_term() diff --git a/matrixcomponent/ontology.py b/matrixcomponent/ontology.py index 6d6196b..d9e7301 100644 --- a/matrixcomponent/ontology.py +++ b/matrixcomponent/ontology.py @@ -168,7 +168,7 @@ def add_to_graph(self, graph: Graph, vg, faldo: Namespace) -> None: if self.linkZoomLevel: graph.add((link, vg.linkZoomLevel, URIRef(self.linkZoomLevel))) - assert self.arrival and self.departure + # assert self.arrival and self.departure if self.arrival: graph.add((link, vg.arrival, URIRef(self.arrival)))