Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Yoann DUFRESNE
linked reads molecule ordering
Commits
697afec3
Commit
697afec3
authored
Mar 14, 2019
by
Yoann Dufresne
Browse files
louvain for evaluation
parent
c475c1d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
deconvolve.py
View file @
697afec3
...
...
@@ -46,8 +46,8 @@ def deconvolve2(G,node):
return
# nothing to deconvolve here
for
node2
,
clique_id
in
cliques
.
items
():
G
.
add_node
(
node
+
"
-MI
%d"
%
clique_id
)
G
.
add_edge
(
node
+
"
-MI
%d"
%
clique_id
,
node2
,
contigs
=
(
G
[
node
][
node2
][
'contigs'
]
if
'contigs'
in
G
[
node
][
node2
]
else
""
))
G
.
add_node
(
node
+
"
.
%d"
%
clique_id
)
G
.
add_edge
(
node
+
"
.
%d"
%
clique_id
,
node2
,
contigs
=
(
G
[
node
][
node2
][
'contigs'
]
if
'contigs'
in
G
[
node
][
node2
]
else
""
))
# for debugging
G2
.
nodes
[
node2
][
'mi'
]
=
clique_id
...
...
@@ -62,4 +62,4 @@ g_nodes = list(G.nodes())
for
node
in
g_nodes
:
deconvolve2
(
G
,
node
)
nx
.
write_graphml
(
G
,
sys
.
argv
[
1
]
+
".deconvolved.graphml"
)
nx
.
write_graphml
(
G
,
sys
.
argv
[
1
]
+
".
louvain-
deconvolved.graphml"
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment