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
a584b1b9
Commit
a584b1b9
authored
May 14, 2020
by
Yoann Dufresne
Browse files
verbose
parent
0f44e223
Changes
1
Hide whitespace changes
Inline
Side-by-side
deconvolution/main/to_d2_graph.py
View file @
a584b1b9
...
...
@@ -13,6 +13,7 @@ def parse_arguments():
parser
.
add_argument
(
'--output_prefix'
,
'-o'
,
default
=
"d2_graph"
,
help
=
"Output file prefix."
)
parser
.
add_argument
(
'--threads'
,
'-t'
,
default
=
8
,
type
=
int
,
help
=
'Number of thread to use for dgraph computation'
)
parser
.
add_argument
(
'--debug'
,
'-d'
,
action
=
'store_true'
,
help
=
"Debug"
)
parser
.
add_argument
(
'--verbose'
,
'-v'
,
type
=
bool
,
action
=
'store_true'
,
help
=
"Verbose"
)
parser
.
add_argument
(
'--edge_divergence_threshold'
,
'-dt'
,
default
=
0.25
,
type
=
float
,
help
=
'Divergence threshold value to link two udgs in the d2-graph'
)
parser
.
add_argument
(
'--maxclq'
,
'-c'
,
action
=
'store_true'
,
help
=
"Enable max clique community detection (default behaviour)"
)
parser
.
add_argument
(
'--louvain'
,
'-l'
,
action
=
'store_true'
,
help
=
"Enable Louvain community detection instead of all max-cliques"
)
...
...
@@ -31,6 +32,7 @@ def main():
def
dprint
(
s
):
from
datetime
import
datetime
t
=
datetime
.
now
().
strftime
(
'%Y-%m-%d %H:%M:%S'
)
print
(
t
,
s
)
dprint
(
"loading barcode graph"
)
if
filename
.
endswith
(
'.gexf'
):
...
...
@@ -65,7 +67,7 @@ def main():
d2g
=
d2
.
D2Graph
(
G
,
debug
=
debug
,
debug_path
=
debug_path
)
dprint
(
"D2 graph object created"
)
dprint
(
"constructing d2 graph from barcode graph"
)
d2g
.
construct_from_barcodes
(
neighbor_threshold
=
args
.
edge_divergence_threshold
,
clique_mode
=
clique_mode
,
threads
=
args
.
threads
)
d2g
.
construct_from_barcodes
(
neighbor_threshold
=
args
.
edge_divergence_threshold
,
clique_mode
=
clique_mode
,
threads
=
args
.
threads
,
verbose
=
args
.
verbose
)
dprint
(
"[debug] d2 graph constructed"
)
# d2g.save(f"{args.output_prefix}.tsv")
...
...
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