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
4a3ba830
Commit
4a3ba830
authored
May 14, 2020
by
Yoann Dufresne
Browse files
path computation
parent
68945d74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Snakefile_d2_path
View file @
4a3ba830
number_try =
10
threshold = 0.5
number_try =
25
threshold = 0.
9
5
rule d2_path_generation:
...
...
@@ -10,15 +10,20 @@ rule d2_path_generation:
output:
"{path}_d2_{type}_{method}_path.gexf"
run:
best = 0
for _ in range(number_try):
shell("python3 deconvolution/main/d2_to_path.py {input.barcode} {input.d2} >
tmp_
{output}.out")
shell("python3 deconvolution/main/d2_to_path.py {input.barcode} {input.d2} > {output}
_tmp
.out")
score = 0
with open("
tmp_
{output}.out") as out:
with open(
f
"{output}
_tmp
.out") as out:
score_line = out.readlines()[-2].strip()
score = float(score_line.split(' ')[-1])
print(score)
if score > best:
best = score
shell("cp {output} {output}.best")
if score > threshold:
print("Score sufficient: quitting...")
break
shell("rm tmp_{output}.out")
shell("rm {output}_tmp.out")
shell("cp {output}.best {output}")
Write
Preview
Supports
Markdown
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