Spaces:
Sleeping
Sleeping
fix syntax
Browse files
app.py
CHANGED
@@ -122,10 +122,16 @@ st.write(neighbors)
|
|
122 |
|
123 |
|
124 |
G = nx.Graph()
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
layout = nx.spring_layout(G)
|
130 |
|
131 |
|
|
|
122 |
|
123 |
|
124 |
G = nx.Graph()
|
125 |
+
for i in range(len(neighbors.index)):
|
126 |
+
edge = neighbors.iloc[i]
|
127 |
+
g.add_edge(
|
128 |
+
edge["gene_index_a"],
|
129 |
+
edge["gene_index_b"],
|
130 |
+
weight = edge["coexp_score"])
|
131 |
+
#G.add_weighted_edges_from(
|
132 |
+
# [neighbors.gene_index_a.to_list()[0:10],
|
133 |
+
# neighbors.gene_index_b.to_list()[0:10],
|
134 |
+
# neighbors.coexp_score.to_list()][0:10])
|
135 |
layout = nx.spring_layout(G)
|
136 |
|
137 |
|