diff --git a/matrixcomponent/PangenomeSchematic.py b/matrixcomponent/PangenomeSchematic.py index 38c0054..9496984 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] + if link.downstream in obin_dict: + to_bin = 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)))