Skip to content
GitLab
Menu
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
0e6da685
Commit
0e6da685
authored
May 14, 2020
by
Rayan CHIKHI
Browse files
fix
parent
49dbee15
Changes
1
Hide whitespace changes
Inline
Side-by-side
deconvolution/main/d2_to_path_simple.py
View file @
0e6da685
...
...
@@ -45,10 +45,10 @@ def main():
initial_node
=
max
(
spl
.
items
(),
key
=
lambda
x
:
x
[
1
])[
0
]
# now find the farthest node to it again
spl1
=
nx
.
shortest_path_length
(
largest_component
,
initial_node
)
one_extremity
=
max
(
spl
.
items
(),
key
=
lambda
x
:
x
[
1
])[
0
]
one_extremity
=
max
(
spl
1
.
items
(),
key
=
lambda
x
:
x
[
1
])[
0
]
# and find the farthest node to it again
spl2
=
nx
.
shortest_path_length
(
largest_component
,
one_extremity
)
other_extremity
=
max
(
spl
.
items
(),
key
=
lambda
x
:
x
[
1
])[
0
]
other_extremity
=
max
(
spl
2
.
items
(),
key
=
lambda
x
:
x
[
1
])[
0
]
path
=
nx
.
shortest_path
(
largest_component
,
one_extremity
,
other_extremity
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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