def test_thorough_json_file(self): """Test the round-trip through a node-link JSON file.""" sio = StringIO() to_nodelink_file(sialic_acid_graph, sio) sio.seek(0) graph = from_nodelink_file(sio) self._help_test_equal(graph)
def process_json_file(file_name): """Return a PybelProcessor by processing a Node-Link JSON file. For more information on this format, see: http://pybel.readthedocs.io/en/latest/io.html#node-link-json Parameters ---------- file_name : str The path to a Node-Link JSON file. Returns ------- bp : PybelProcessor A PybelProcessor object which contains INDRA Statements in bp.statements. """ pybel_graph = pybel.from_nodelink_file(file_name, check_version=False) return process_pybel_graph(pybel_graph)
def test_thorough_json_file(self): sio = StringIO() to_nodelink_file(self.thorough_graph, sio) sio.seek(0) graph = from_nodelink_file(sio) self.bel_thorough_reconstituted(graph)