Skip to content
GitLab
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
395eb134
Commit
395eb134
authored
Aug 07, 2017
by
Lukas Jelonek
Browse files
Fix bug: ghostx adds the whole fasta header as a query to its results
parent
4be6ffd5
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/convert_ghostx.py
View file @
395eb134
...
...
@@ -25,9 +25,12 @@ with open(result_filename) as f:
for
line
in
f
:
line
=
line
.
strip
()
split
=
line
.
split
(
"
\t
"
)
if
not
split
[
0
]
in
documents
:
documents
[
split
[
0
]]
=
{
"id"
:
split
[
0
],
"computations"
:
[{
'tool'
:
tool
,
'results'
:[]}]}
results
=
documents
[
split
[
0
]][
'computations'
][
0
][
'results'
]
# ghostx may contain the full fasta header as a query
# remove everything after the actual id
id
=
split
[
0
].
split
()[
0
]
if
not
id
in
documents
:
documents
[
id
]
=
{
"id"
:
id
,
"computations"
:
[{
'tool'
:
tool
,
'results'
:[]}]}
results
=
documents
[
id
][
'computations'
][
0
][
'results'
]
result
=
{}
accession
=
split
[
1
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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