def main(): pathway1 = "R-HSA-9613829" # Regulation of glycolysis by fructose 2,6-bisphosphate metabolism os.chdir(os.path.dirname(os.path.abspath(sys.executable)) + "\\..\\..") print(f"Working directory: {os.getcwd()}") g = create_pathway_interaction_network(pathway1, proteoforms, with_unique_sm, "resources/pathway_networks/") # Calculate articulation points list() # Calculate bridges # Mark edges # Update the graph file p = plot_interaction_network( g, coloring=Coloring.ENTITY_TYPE, plot_width=600, plot_height=500, title="Test Plot Bridges and Articulation Points", legend_location="right") show(p) print("Finished")
def main(): pathway1 = "R-HSA-8876725" os.chdir(os.path.dirname(os.path.abspath(sys.executable)) + "\\..\\..") print(os.getcwd()) g = create_pathway_interaction_network(pathway1, config.proteoforms, config.with_unique_sm, "resources/pathway_networks/") p = plot_interaction_network(g, coloring=Coloring.ENTITY_TYPE, plot_width=600, plot_height=500, title="Test title", legend_location="right") graphs = create_pathway_interaction_networks( pathway1, "resources/pathway_networks/") p = plot_pathway_all_levels(pathway1, out_path="resources/pathway_networks/", graphs=graphs, coloring=Coloring.ENTITY_TYPE, outline_line_width=1, node_size=12, inner_plot_size=350, highlight_articulations=True, highlight_bridges=True, toolbar_location=None) show(p)
def glycolysis_graph(tmpdir_factory): # Pathway "Regulation of glycolysis by fructose" R-HSA-9634600 graphs_path = tmpdir_factory.mktemp("tmpdir") return create_pathway_interaction_network("R-HSA-9634600", proteoforms, with_sm, graphs_path)
def signal_graph(tmpdir_factory): # Pathway "FRS-mediated FGFR3 signaling" R-HSA-5654706 graphs_path = tmpdir_factory.mktemp("tmpdir") return create_pathway_interaction_network("R-HSA-5654706", proteoforms, with_sm, graphs_path)
def traffic_graph(tmpdir_factory): # Pathway "RHO sm_GTPases regulate P13569 trafficking" R-HSA-5627083 graphs_path = tmpdir_factory.mktemp("tmpdir") return create_pathway_interaction_network("R-HSA-5627083", proteoforms, with_sm, graphs_path)
def test_create_graph_wrong_level_raises_exception(): with pytest.raises(Exception): create_pathway_interaction_network("R-HSA-9634600", "banana", no_sm)
def pathway_free_fatty_acid_receptors(tmpdir_factory): # Pathway "Free fatty acid receptors" R-HSA-444209 graphs_path = tmpdir_factory.mktemp("tmpdir") return create_pathway_interaction_network("R-HSA-444209", genes, with_sm, graphs_path)
def PI_3K_cascade_FGFR3_graph_with_unique_sm(tmpdir_factory): # Pathway "PI-3K cascade:FGFR3" R-HSA-5654710 graphs_path = tmpdir_factory.mktemp("tmpdir") g = create_pathway_interaction_network("R-HSA-5654710", proteoforms, with_unique_sm, graphs_path) return g