Commit cdd430e8 authored by Yoann Dufresne's avatar Yoann Dufresne
Browse files

decovolution simplification

parent 27d8a351
......@@ -31,11 +31,9 @@ class CliqueDGFactory(AbstractDGFactory):
clq_per_node[node].append(idx)
# clq_per_node for nei can be empty because of minimum clique size
# So we add singleton cliques for those nodes
for node in subgraph.nodes:
if node not in clq_per_node:
cliques.append([node])
clq_per_node[node] = [len(cliques) - 1]
clq_per_node[node] = []
# Pair cliques
clq_pairs = set()
......
......@@ -30,14 +30,17 @@ def main():
exit(1)
# Loading
print("--- d2 graph loading ---")
G = nx.read_gexf(barcode_file)
d2g = d2.D2Graph(G)
d2g.load(d2_file)
# Algorithms for reduction
print("--- 3-reduction processing ---")
d2a.transitive_reduction(d2g)
# Take the principal component
print("--- Extract and write the graph ---")
components = [c for c in nx.connected_components(d2g) if len(c) > args.component_min_size]
nodes = set()
for comp in components:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment