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
51f71fb9
Commit
51f71fb9
authored
Apr 02, 2020
by
Yoann Dufresne
Browse files
bugfix: empty clique don't bug anymore
parent
e4003d29
Changes
1
Hide whitespace changes
Inline
Side-by-side
deconvolution/dgraph/CliqueDGFactory.py
View file @
51f71fb9
...
...
@@ -30,6 +30,13 @@ class CliqueDGFactory(AbstractDGFactory):
clq_per_node
[
node
]
=
[]
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
]
# Pair cliques
clq_pairs
=
set
()
for
idx
,
clq
in
enumerate
(
cliques
):
...
...
@@ -37,10 +44,6 @@ class CliqueDGFactory(AbstractDGFactory):
neighbors
=
list
(
subgraph
.
neighbors
(
node
))
# Looks into the neighbors for clique pairing
for
nei
in
neighbors
:
if
nei
not
in
clq_per_node
:
print
(
"!!!!!!!!!!!!!!!"
)
print
(
clq_per_node
)
print
(
"!!!!!!!!!!!!!!!"
)
nei_clqs
=
clq_per_node
[
nei
]
# Pair useful cliques
for
nei_clq
in
nei_clqs
:
...
...
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