Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
17ab708c
Commit
17ab708c
authored
Aug 11, 2016
by
marc
Committed by
Mathieu Giraud
Sep 22, 2016
Browse files
fuse.py: add a limit to similarity (don't compute gigantic similarity matrix)
parent
fffd62b2
Changes
1
Show whitespace changes
Inline
Side-by-side
tools/fuse.py
View file @
17ab708c
...
...
@@ -46,6 +46,7 @@ from collections import defaultdict
FUSE_VERSION
=
"vidjil fuse"
TOOL_SIMILARITY
=
"../algo/tools/similarity"
SIMILARITY_LIMIT
=
1000
GERMLINES_ORDER
=
[
'TRA'
,
'TRB'
,
'TRG'
,
'TRD'
,
'DD'
,
'IGH'
,
'DHJH'
,
'IJK'
,
'IJL'
]
...
...
@@ -739,6 +740,7 @@ def main():
print
()
#compute similarity matrix
if
len
(
jlist_fused
.
d
[
"clones"
])
<
SIMILARITY_LIMIT
:
fasta
=
""
for
i
in
range
(
len
(
jlist_fused
.
d
[
"clones"
]))
:
fasta
+=
">>"
+
str
(
i
)
+
"
\n
"
...
...
@@ -750,6 +752,8 @@ def main():
jlist_fused
.
d
[
"similarity"
]
=
json
.
loads
(
out
)
except
OSError
:
print
(
"! failed: %s"
%
TOOL_SIMILARITY
)
print
(
"### Save merged file"
)
jlist_fused
.
save_json
(
args
.
output
)
os
.
unlink
(
fasta_file
.
name
)
...
...
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