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
c6f18289
Commit
c6f18289
authored
Dec 01, 2017
by
hmueller
Browse files
Minor code cosmetics
parent
1e084c41
Changes
2
Hide whitespace changes
Inline
Side-by-side
scripts/convert_hmmer.py
View file @
c6f18289
...
...
@@ -38,7 +38,7 @@ with open(filename) as f:
try
:
queries
.
remove
(
query_id
)
except
ValueError
:
print
(
'HMMER converter: Query ID "'
+
query_id
+
'" not
present
among initial queries!'
)
print
(
'HMMER converter: Query ID "'
+
query_id
+
'" not
found
among initial queries!'
)
results
=
documents
[
query_id
][
'computations'
][
0
][
"results"
]
results
.
append
({
...
...
@@ -57,11 +57,8 @@ with open(filename) as f:
}
})
# Include queries with no matches in results
for
query_id
in
queries
:
print
(
"In list: "
+
query_id
)
if
not
query_id
in
documents
:
print
(
"Recording: "
+
query_id
)
documents
[
query_id
]
=
{
"id"
:
query_id
,
"computations"
:
[{
'tool'
:
tool
,
'results'
:
"no match found"
}]}
output_filename
=
args
.
output
...
...
scripts/run_hmmer.py
View file @
c6f18289
...
...
@@ -18,7 +18,7 @@ makedirs(args.output, exist_ok=True)
system
(
hmmscan_tool
+
" -E "
+
args
.
evalue
+
" -o "
+
args
.
output
+
"/hmmscan.out "
+
" -o "
+
args
.
output
+
"/hmmscan.out "
+
" --tblout "
+
args
.
output
+
"/tblout.tsv "
+
" --domtblout "
+
args
.
output
+
"/domtblout.tsv "
+
" --pfamtblout "
+
args
.
output
+
"/pfamtblout.tsv "
+
...
...
@@ -32,6 +32,6 @@ with open(args.fasta) as f:
if
line
.
startswith
(
'>'
):
queries
.
append
(
line
.
replace
(
'>'
,
''
).
strip
())
query_file
=
args
.
output
+
'/
'
+
'
queries.json'
query_file
=
args
.
output
+
'/queries.json'
with
open
(
query_file
,
'w'
)
as
o
:
json
.
dump
(
queries
,
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