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
2eef3ef9
Commit
2eef3ef9
authored
Jun 14, 2022
by
Mustafa Tekpinar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alphabet selection was added as an input argument!
parent
49d39490
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
computePred.R
computePred.R
+3
-1
gemme.py
gemme.py
+8
-3
gemmeAnal.py
gemmeAnal.py
+3
-3
No files found.
computePred.R
View file @
2eef3ef9
...
...
@@ -23,6 +23,7 @@ aliFile = args[2]
simple
=
args
[
3
]
fname
=
args
[
4
]
normWeightMode
=
args
[
5
]
selectedAlphabet
=
args
[
6
]
# read alignment and convert to matrix
ali
=
as.matrix.alignment
(
read.alignment
(
aliFile
,
format
=
"fasta"
))
...
...
@@ -241,7 +242,8 @@ print(alpha)
alphabet
=
"lz-bl.7"
#alphabet = "lz-bl.7"
alphabet
=
selectedAlphabet
if
(
simple
){
normPredCombi
=
normalizePredWithNbSeqsPC
(
pred
,
trace
,
wt
,
alpha
,
nbSeqs
,
alphabet
)
rownames
(
normPredCombi
)
=
aa
...
...
gemme.py
View file @
2eef3ef9
...
...
@@ -363,6 +363,10 @@ def parse_command_line():
help
=
"If a jet file is provided, it will skip JET2 calculation and use the precalculated JET2 data in that file. Default is None"
,
required
=
False
,
default
=
None
)
retMet_args
.
add_argument
(
'--alphabet'
,
dest
=
'alphabet'
,
type
=
str
,
\
help
=
"Which alphabet to use. Default is lz-bl.7"
,
required
=
False
,
default
=
"lz-bl.7"
)
retMet_args
.
add_argument
(
'-p'
,
'--pdbfile'
,
dest
=
'pdbfile'
,
type
=
str
,
\
help
=
"If a pdb file is provided, it will skip fake pdb file production step and use that file. Default is None"
,
required
=
False
,
default
=
None
)
...
...
@@ -384,7 +388,7 @@ def parse_command_line():
return
args
def
doit
(
inAli
,
mutFile
,
retMet
,
bFile
,
fFile
,
n
,
N
,
jetfile
,
pdbfile
,
normWeightMode
):
def
doit
(
inAli
,
mutFile
,
retMet
,
bFile
,
fFile
,
n
,
N
,
jetfile
,
pdbfile
,
normWeightMode
,
alphabet
):
"""
Perfect explanation for a function: typing the function call exactly!
doit is basically the main function in disguise!
...
...
@@ -468,7 +472,7 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode)
print
(
df
)
launchPred
(
prot
,
inAli
,
mutFile
,
normWeightMode
)
launchPred
(
prot
,
inAli
,
mutFile
,
normWeightMode
,
alphabet
)
#Do Python plotting here
#TODO: Eventually, I will do the map plotting with a completely independent
...
...
@@ -514,7 +518,8 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode)
def
main
():
args
=
parse_command_line
()
doit
(
args
.
input
,
args
.
mutations
,
args
.
retrievingMethod
,
args
.
blastFile
,
\
args
.
fastaFile
,
args
.
nIter
,
args
.
NSeqs
,
args
.
jetfile
,
args
.
pdbfile
,
args
.
normweightmode
)
args
.
fastaFile
,
args
.
nIter
,
args
.
NSeqs
,
args
.
jetfile
,
args
.
pdbfile
,
\
args
.
normweightmode
,
args
.
alphabet
)
if
(
__name__
==
'__main__'
):
main
()
...
...
gemmeAnal.py
View file @
2eef3ef9
...
...
@@ -172,12 +172,12 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl):
return
(
reCode
)
# Run Rscript to compute predictions
def
launchPred
(
prot
,
inAli
,
mutFile
,
normWeightMode
):
def
launchPred
(
prot
,
inAli
,
mutFile
,
normWeightMode
,
alphabet
):
if
mutFile
!=
''
:
rcmd
=
"Rscript --save $GEMME_PATH/computePred.R "
+
prot
+
" "
+
inAli
+
" FALSE "
+
mutFile
+
" "
+
normWeightMode
rcmd
=
"Rscript --save $GEMME_PATH/computePred.R "
+
prot
+
" "
+
inAli
+
" FALSE "
+
mutFile
+
" "
+
normWeightMode
+
" "
+
alphabet
else
:
rcmd
=
"Rscript --save $GEMME_PATH/computePred.R "
+
prot
+
" "
+
inAli
+
" TRUE none "
+
normWeightMode
rcmd
=
"Rscript --save $GEMME_PATH/computePred.R "
+
prot
+
" "
+
inAli
+
" TRUE none "
+
normWeightMode
+
" "
+
alphabet
print
(
"
\n
Running:
\n
"
+
rcmd
)
reCode
=
subprocess
.
call
(
rcmd
,
shell
=
True
)
...
...
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