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
202ab9c1
Commit
202ab9c1
authored
Oct 18, 2017
by
lmueller
Browse files
added tmhmm module
parent
8487d7da
Changes
4
Hide whitespace changes
Inline
Side-by-side
config.yaml
View file @
202ab9c1
tools
:
tools
:
signalp
:
'
/vol/biotools/bin/signalp'
signalp
:
'
/vol/biotools/bin/signalp'
ghostx
:
'
/vol/biotools/bin/ghostx'
ghostx
:
'
/vol/biotools/bin/ghostx'
tmhmm
:
'
/vol/biotools/bin/tmhmm'
modules/tmhmm.yaml
0 → 100644
View file @
202ab9c1
# Module manifest for the tmhmm analysis
# The name of the module. Is needed for the list-analyses option, for custom
# configurations and custom profiles.
name
:
'
tmhmm'
# Short description of the analysis.
info
:
'
predict
transmembrane
helices
in
proteins'
# The configuration of the script for the analysis step.
analysis
:
# script must take a --fasta parameter
script
:
'
run_tmhmm.py'
# specify additional default configuration here
parameters
:
# The configuration of the script for the json conversion step.
converter
:
# script must take a --result parameter, which is the result from the analysis step
script
:
'
convert_tmhmm.py'
# specify additional default configuration here
parameters
:
scripts/convert_tmhmm.py
0 → 100755
View file @
202ab9c1
#!/usr/bin/python3
import
sys
import
json
import
argparse
parser
=
argparse
.
ArgumentParser
(
description
=
'Convert tmhmm results to json documents'
)
parser
.
add_argument
(
'--result'
,
'-r'
,
required
=
True
,
help
=
'The tmhmm result file'
)
parser
.
add_argument
(
'--output'
,
'-o'
,
required
=
True
,
help
=
'The converted results json file'
)
args
=
parser
.
parse_args
()
filename
=
args
.
result
documents
=
{}
with
open
(
filename
)
as
f
:
for
line
in
f
:
line_dic
=
{}
elements
=
line
.
rstrip
().
split
(
"
\t
"
)
for
i
in
range
(
1
,
len
(
elements
)):
line_dic
[
elements
[
i
][:
elements
[
i
].
rfind
(
'='
)]]
=
elements
[
i
][
elements
[
i
].
rfind
(
'='
)
+
1
:]
documents
[
elements
[
0
]]
=
line_dic
output_filename
=
args
.
output
with
open
(
output_filename
,
'w'
)
as
o
:
json
.
dump
(
documents
,
o
)
scripts/run_tmhmm.py
0 → 100755
View file @
202ab9c1
#!/usr/bin/env python3
import
env
import
argparse
from
psot
import
config
from
os
import
system
import
subprocess
tmhmm_tool
=
config
.
load_config
()[
'tools'
].
get
(
'tmhmm'
,
'tmhmm'
)
parser
=
argparse
.
ArgumentParser
(
description
=
'Find transmembrane helices in amino acid sequences'
)
parser
.
add_argument
(
'--fasta'
,
'-f'
,
required
=
True
,
help
=
'A fasta file with aminoacid sequences'
)
#parser.add_argument('--workdir', '-workdir', help='Working directory')
#parser.add_argument('--wwwdir', '-wwwdir', help='The place where the www server looks for files')
#parser.add_argument('--serverhome', '-serverhome', help='') #
#parser.add_argument('--basedir', '-basedir', help='basis directory for TMHMM package')
#parser.add_argument('--bindir', '-bindir', help='Bin directory (defaults basedir/bin)')
#parser.add_argument('--scrdir', '-scrdir', help='Script directory (defaults basedir/bin)')
#parser.add_argument('--libdir', '-libdir', help='Library directory (defaults basedir/lib)')
#parser.add_argument('--html', '-html', help='Produce HTML output')
#parser.add_argument('--short', '-s', help='Short output format')
#parser.add_argument('--plot', '-p', help='Produce graphics')
#parser.add_argument('--version1', '-v1', help='Use old model (version 1)')
#parser.add_argument('--debugging', '-d', help='') #
parser
.
add_argument
(
'--output'
,
required
=
True
,
help
=
'The output file'
)
args
=
parser
.
parse_args
()
system
(
"cat "
+
args
.
fasta
+
" | "
+
tmhmm_tool
+
" -short > "
+
args
.
output
)
#
Write
Preview
Supports
Markdown
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