Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PRESCOTT
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mustafa Tekpinar
PRESCOTT
Commits
35c5654f
Commit
35c5654f
authored
Jun 22, 2023
by
Mustafa Tekpinar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added --maxcoillength argument.
parent
b14838e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
esgemme.py
esgemme/esgemme.py
+21
-12
No files found.
esgemme/esgemme.py
View file @
35c5654f
...
...
@@ -267,7 +267,7 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl):
prot
+
".pdb -o `pwd` -p AVJCG -r input -f "
+
prot
+
"_"
+
chainID
+
".fasta -d chain -n "
+
n
+
" -a 3"
+
" > "
+
prot
+
".out"
#One can also add: -g 'trace,pc,cv,clusters,axs'
print
(
"
\n
Running
for SC1
:
\n
"
+
jetcmd
)
print
(
"
\n
Running
JET2 with following arguments
:
\n
"
+
jetcmd
)
reCode
=
subprocess
.
call
(
jetcmd
,
shell
=
True
)
if
os
.
path
.
isfile
(
prot
+
"/"
+
prot
+
"_jet.res"
):
os
.
rename
(
prot
+
"/"
+
prot
+
"_jet.res"
,
prot
+
"_jet.res"
)
...
...
@@ -334,7 +334,7 @@ def launchPred(prot,inAli,mutFile, normWeightMode, alphabet):
# rcmd="Rscript --save $ESGEMME_PATH/computePred.R "+prot+" "+inAli+" TRUE none "+normWeightMode+" "+alphabet
rcmd
=
"Rscript --save computePred.R "
+
prot
+
" "
+
inAli
+
" TRUE none "
+
normWeightMode
+
" "
+
alphabet
print
(
"
\n
Running:
\n
"
+
rcmd
)
print
(
"
\n
Running
Rscript with following arguments
:
\n
"
+
rcmd
)
reCode
=
subprocess
.
call
(
rcmd
,
shell
=
True
)
#Add plots here with gemmemore
...
...
@@ -955,6 +955,10 @@ def parse_command_line():
help
=
"Select a colormap from standard matplotlib colormaps"
,
required
=
False
,
default
=
'Oranges_r'
)
parser
.
add_argument
(
'--maxcoillength'
,
dest
=
'maxcoillength'
,
type
=
int
,
\
help
=
"If coil length is > maxcoillength, it will use JET values."
,
required
=
False
,
default
=
5
)
args
=
parser
.
parse_args
()
arg_dict
=
vars
(
args
)
...
...
@@ -969,12 +973,13 @@ def parse_command_line():
def
doit
(
inAli
,
mutFile
,
retMet
,
bFile
,
fFile
,
n
,
N
,
jetfile
,
pdbfile
,
normWeightMode
,
\
alphabet
,
verbosity
,
offset
,
colormap
):
alphabet
,
verbosity
,
offset
,
colormap
,
maxCoilLength
=
5
):
"""
Perfect explanation for a function: typing the function call exactly!
doit is basically the main function in disguise!
doit(args.input,args.mutations,args.retrievingMethod,args.blastFile,args.fastaFile, args.jetfile)
"""
debug
=
0
if
(
mutFile
!=
''
):
simple
=
False
else
:
...
...
@@ -1040,18 +1045,21 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode,
countCoilSegments
(
pdbfile
+
".dssp"
)
df
=
pd
.
read_table
(
prot
+
"_jet.res"
,
sep
=
"
\
s+"
)
print
(
df
[
'pos'
])
print
(
pdbfile
+
".dssp"
)
print
(
os
.
getcwd
())
df2
=
pd
.
read_table
(
pdbfile
+
".dssp.new"
,
header
=
None
,
sep
=
","
)
df2
=
pd
.
read_table
(
pdbfile
+
".dssp.new"
,
header
=
None
,
sep
=
","
)
df2
.
columns
=
[
'pos'
,
'ss'
,
'length'
]
print
(
df2
)
mergedRes
=
pd
.
merge
(
df
,
df2
,
on
=
'pos'
,
right_index
=
False
)
print
(
mergedRes
)
if
(
debug
):
print
(
df
[
'pos'
])
print
(
pdbfile
+
".dssp"
)
print
(
os
.
getcwd
())
print
(
df2
)
print
(
mergedRes
)
sstjetormaxList
=
[]
maxCoilLength
=
5
#
maxCoilLength = 5
print
(
"WARNING: Max. coil length = {}"
.
format
(
maxCoilLength
))
for
index
,
row
in
mergedRes
.
iterrows
():
if
(
row
[
'ss'
]
==
'C'
)
and
(
row
[
'length'
]
>
maxCoilLength
):
...
...
@@ -1245,7 +1253,8 @@ def main():
doit
(
args
.
input
,
args
.
mutations
,
args
.
retrievingMethod
,
args
.
blastFile
,
\
args
.
fastaFile
,
args
.
nIter
,
args
.
NSeqs
,
args
.
jetfile
,
args
.
pdbfile
,
\
args
.
normweightmode
,
args
.
alphabet
,
args
.
verbose
,
args
.
offset
,
args
.
colormap
)
args
.
normweightmode
,
args
.
alphabet
,
args
.
verbose
,
args
.
offset
,
\
args
.
colormap
,
maxCoilLength
=
args
.
maxcoillength
)
toc
=
time
.
perf_counter
()
...
...
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