Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Roman Sarrazin-Gendron
BP6.1
Commits
3dfc0b7a
Commit
3dfc0b7a
authored
Feb 13, 2018
by
Roman Sarrazin-Gendron
Browse files
blanchette run ready
parent
27e83032
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/parse_sequences.py
View file @
3dfc0b7a
...
...
@@ -48,6 +48,7 @@ def run_fasta(input, modules_to_parse,dataset,ss = "",arguments={}):
with
open
(
input
,
"rU"
)
as
f
:
for
num
,
record
in
enumerate
(
SeqIO
.
parse
(
f
,
"fasta"
)):
id
=
record
.
id
seq
=
record
.
seq
prediction_scores
[
id
]
=
{}
if
"T"
in
seq
:
seq
=
str
(
record
.
seq
).
replace
(
"T"
,
"U"
)
...
...
@@ -62,7 +63,7 @@ def run_fasta(input, modules_to_parse,dataset,ss = "",arguments={}):
prediction_scores
[
id
][
modules_to_parse
[
ind
]]
=
(
maxs
[
ind
][
0
],
maxs
[
ind
][
1
])
else
:
prediction_scores
[
id
][
modules_to_parse
[
ind
]]
=
(
0
,
[])
pickle
.
dump
(
prediction_scores
,
open
(
"prediction_
test
.cPickle"
,
"wb"
))
pickle
.
dump
(
prediction_scores
,
open
(
"prediction_
ircm
.cPickle"
,
"wb"
))
else
:
if
"T"
in
input
:
input
=
str
(
input
).
replace
(
"T"
,
"U"
)
...
...
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