Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
vidjil
vidjil
Commits
7732d520
Commit
7732d520
authored
Nov 10, 2016
by
Mathieu Giraud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imgt-to-vdj.py: further factorization between IMGT and MiXCR wrappers
parent
dc0a51ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
algo/tests/imgt-to-vdj.py
algo/tests/imgt-to-vdj.py
+10
-14
No files found.
algo/tests/imgt-to-vdj.py
View file @
7732d520
...
...
@@ -129,7 +129,8 @@ def header_vquest_results(ff_fasta, ff_vquest):
while
not
vquest
:
vquest
=
f_vquest
.
next
().
strip
()
yield
(
fasta
,
vquest
)
r
=
IMGT_VQUEST_Result
(
result
)
yield
(
fasta
.
replace
(
'>'
,
''
),
r
.
to_vdj
())
def
header_mixcr_results
(
ff_mixcr
):
...
...
@@ -148,17 +149,12 @@ def header_mixcr_results(ff_mixcr):
if
__name__
==
'__main__'
:
if
'mixcr'
in
sys
.
argv
[
1
]:
for
(
header
,
result
)
in
header_mixcr_results
(
sys
.
argv
[
1
]):
print
"#%s"
%
header
print
">%s"
%
result
print
sys
.
exit
(
0
)
for
(
header
,
result
)
in
header_vquest_results
(
sys
.
argv
[
1
],
sys
.
argv
[
2
]):
# print "=========="
print
header
.
replace
(
'>'
,
'#'
)
r
=
IMGT_VQUEST_Result
(
result
)
# print r
print
">%s"
%
r
.
to_vdj
()
gen
=
header_mixcr_results
(
sys
.
argv
[
1
])
else
:
gen
=
header_vquest_results
(
sys
.
argv
[
1
],
sys
.
argv
[
2
])
# output .vdj data
for
(
header
,
result
)
in
gen
:
print
"#%s"
%
header
print
">%s"
%
result
print
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