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
cdd430e8
Commit
cdd430e8
authored
Apr 02, 2020
by
Yoann Dufresne
Browse files
decovolution simplification
parent
27d8a351
Changes
2
Hide whitespace changes
Inline
Side-by-side
deconvolution/dgraph/CliqueDGFactory.py
View file @
cdd430e8
...
...
@@ -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
()
...
...
deconvolution/main/d2_reduction.py
View file @
cdd430e8
...
...
@@ -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
:
...
...
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