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
c040c5fd
Commit
c040c5fd
authored
Nov 30, 2017
by
Lukas Jelonek
Browse files
Merge commit '
9db2c064
' into develop
parents
535a948c
9db2c064
Changes
6
Hide whitespace changes
Inline
Side-by-side
config.yaml
View file @
c040c5fd
tools
:
signalp
:
'
/vol/biotools/bin/signalp'
ghostx
:
'
/vol/biotools/bin/ghostx'
tmhmm
:
'
/vol/biotools/bin/tmhmm'
docs/source/installation.rst
View file @
c040c5fd
...
...
@@ -15,6 +15,7 @@ In order to run PSOT on your machine you need:
* hmmscan
* signalp
* ghostx
* tmhmm
* the bioinformatic databases you want to use
...
...
modules/tmhmm.yaml
0 → 100644
View file @
c040c5fd
# 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
:
profiles/fast.yaml
View file @
c040c5fd
...
...
@@ -4,3 +4,4 @@ modules:
ghostx_swissprot
:
signalp
:
organism
:
'
euk'
tmhmm
:
scripts/convert_tmhmm.py
0 → 100755
View file @
c040c5fd
#!/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
()
def
parse_topology
(
s
,
l
):
elements
=
[]
result
=
[]
flag
=
False
num
=
""
for
c
in
s
:
if
c
==
'i'
or
c
==
'o'
or
c
==
'-'
:
if
num
!=
""
:
elements
.
append
(
int
(
num
))
num
=
""
if
c
!=
'-'
:
elements
.
append
(
c
)
else
:
num
+=
c
if
num
!=
""
:
elements
.
append
(
int
(
num
))
for
i
in
range
(
len
(
elements
)):
if
flag
:
flag
=
False
else
:
if
elements
[
i
]
==
'i'
or
elements
[
i
]
==
'o'
:
location
=
""
if
elements
[
i
]
==
'i'
:
location
=
"inside"
else
:
location
=
"outside"
if
i
==
0
:
if
len
(
elements
)
==
1
:
result
.
append
({
'start'
:
1
,
'end'
:
l
,
'location'
:
location
})
else
:
result
.
append
({
'start'
:
1
,
'end'
:
elements
[
i
+
1
]
-
1
,
'location'
:
location
})
elif
i
+
1
==
len
(
elements
):
result
.
append
({
'start'
:
elements
[
i
-
1
]
+
1
,
'end'
:
l
,
'location'
:
location
})
else
:
result
.
append
({
'start'
:
elements
[
i
-
1
]
+
1
,
'end'
:
elements
[
i
+
1
]
-
1
,
'location'
:
location
})
else
:
result
.
append
({
'start'
:
elements
[
i
],
'end'
:
elements
[
i
+
1
]
,
'location'
:
'membrane'
})
flag
=
True
return
(
result
)
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
)):
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
output_filename
=
args
.
output
with
open
(
output_filename
,
'w'
)
as
o
:
json
.
dump
(
documents
,
o
)
scripts/run_tmhmm.py
0 → 100755
View file @
c040c5fd
#!/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
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