Skip to content

Commit

Permalink
precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
ntalluri committed Sep 26, 2023
1 parent a34f832 commit 9b551d6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/analysis/graphspace.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import json
import os
import sys
import pandas as pd

import networkx as nx
import pandas as pd
from graphspace_python.api.client import GraphSpace
from graphspace_python.graphs.classes.gsgraph import GSGraph


# remove all the the directed = bool in the function names
def write_json(graph_file,out_graph,out_style) -> None:

Expand Down Expand Up @@ -61,7 +63,7 @@ def get_gs_graph(graph_file:str,graph_name:str) -> GSGraph:
def load_graph(path: str) -> nx.Graph:
G = nx.Graph()
directed = False

try:
pathways = pd.read_csv(path, sep="\t", header=None)
except pd.errors.EmptyDataError:
Expand All @@ -77,7 +79,7 @@ def load_graph(path: str) -> nx.Graph:
elif mask_d.all():
G = nx.read_edgelist(path,data=(('rank',float),('Direction',str)), create_using=nx.DiGraph)
directed = True
else:
else:
print("graphspace does not deal with mixed direction type graphs currently")

return G, directed
return G, directed

0 comments on commit 9b551d6

Please sign in to comment.