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
SOaAS
psot.repository
Commits
e9e5fe63
Commit
e9e5fe63
authored
Nov 30, 2017
by
lmueller
Browse files
fixed tmhmm json format
parent
bf196bb1
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/convert_tmhmm.py
View file @
e9e5fe63
...
...
@@ -59,10 +59,12 @@ with open(filename) as f:
key
=
elements
[
i
][:
elements
[
i
].
rfind
(
'='
)]
value
=
elements
[
i
][
elements
[
i
].
rfind
(
'='
)
+
1
:]
if
key
==
'Topology'
:
line_dic
[
key
]
=
parse_topology
(
value
,
elements
[
i
-
4
][
elements
[
i
-
4
].
rfind
(
'='
)
+
1
:])
else
:
line_dic
[
key
]
=
value
documents
[
elements
[
0
]]
=
line_dic
line_dic
[
'topology'
]
=
parse_topology
(
value
,
int
(
elements
[
i
-
4
][
elements
[
i
-
4
].
rfind
(
'='
)
+
1
:]))
elif
key
==
'PredHel'
:
line_dic
[
key
]
=
int
(
value
)
elif
not
key
==
'len'
:
line_dic
[
key
]
=
float
(
value
)
documents
[
elements
[
0
]]
=
{
'computations'
:
[{
'tool'
:
{
'name'
:
'TMHMM'
,
'version'
:
'2.0'
},
'results'
:
line_dic
}]}
output_filename
=
args
.
output
with
open
(
output_filename
,
'w'
)
as
o
:
...
...
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