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
d7774e36
Commit
d7774e36
authored
May 09, 2022
by
Mustafa Tekpinar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed the argument --isjet2off to --jetfile.
parent
49dff695
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
13 deletions
+18
-13
example-gemme-script.sh
example/example-gemme-script.sh
+1
-1
gemme.py
gemme.py
+17
-12
No files found.
example/example-gemme-script.sh
View file @
d7774e36
...
@@ -17,7 +17,7 @@ then
...
@@ -17,7 +17,7 @@ then
echo
"Running GEMME with a user-provided alignment file."
echo
"Running GEMME with a user-provided alignment file."
echo
"Using a previously produced prot_jet.res file to check reproducibility!"
echo
"Using a previously produced prot_jet.res file to check reproducibility!"
cp ../tests/BLAT_jet.res
.
cp ../tests/BLAT_jet.res
.
python
$GEMME_PATH
/gemme.py aliBLAT.fasta
-r
input
-f
aliBLAT.fasta
--
isjet2on
false
python
$GEMME_PATH
/gemme.py aliBLAT.fasta
-r
input
-f
aliBLAT.fasta
--
jetfile
BLAT_jet.res
else
else
echo
"Running GEMME with a user-provided alignment file."
echo
"Running GEMME with a user-provided alignment file."
...
...
gemme.py
View file @
d7774e36
...
@@ -256,9 +256,9 @@ def parse_command_line():
...
@@ -256,9 +256,9 @@ def parse_command_line():
default
=
''
default
=
''
)
)
retMet_args
.
add_argument
(
'--
isjet2on'
,
dest
=
'isjet2on
'
,
type
=
str
,
\
retMet_args
.
add_argument
(
'--
jetfile'
,
dest
=
'jetfile
'
,
type
=
str
,
\
help
=
"If
false, it will skip JET2 calculation and use a precalculated JET2 file. Default is tru
e"
,
help
=
"If
a jet file is provided, it will skip JET2 calculation and use the precalculated JET2 data in that file. Default is Non
e"
,
required
=
False
,
default
=
"True"
)
required
=
False
,
default
=
None
)
retMet_args
.
add_argument
(
'--normweightmode'
,
dest
=
'normweightmode'
,
type
=
str
,
\
retMet_args
.
add_argument
(
'--normweightmode'
,
dest
=
'normweightmode'
,
type
=
str
,
\
help
=
"It can be one of these: 'trace', 'trace+pc', 'trace+cv' or 'trace+pc+cv'. Default is 'trace'."
,
help
=
"It can be one of these: 'trace', 'trace+pc', 'trace+cv' or 'trace+pc+cv'. Default is 'trace'."
,
...
@@ -277,11 +277,11 @@ def parse_command_line():
...
@@ -277,11 +277,11 @@ def parse_command_line():
return
args
return
args
def
doit
(
inAli
,
mutFile
,
retMet
,
bFile
,
fFile
,
n
,
N
,
isjet2on
,
normWeightMode
):
def
doit
(
inAli
,
mutFile
,
retMet
,
bFile
,
fFile
,
n
,
N
,
jetfile
,
normWeightMode
):
"""
"""
Perfect explanation for a function: typing the function call exactly!
Perfect explanation for a function: typing the function call exactly!
doit is basically the main function in disguise!
doit is basically the main function in disguise!
doit(args.input,args.mutations,args.retrievingMethod,args.blastFile,args.fastaFile, args.
isjet2on
)
doit(args.input,args.mutations,args.retrievingMethod,args.blastFile,args.fastaFile, args.
jetfile
)
"""
"""
simple
=
True
simple
=
True
...
@@ -291,19 +291,24 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, isjet2on, normWeightMode):
...
@@ -291,19 +291,24 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, isjet2on, normWeightMode):
print
(
"query protein: "
+
prot
)
print
(
"query protein: "
+
prot
)
if
((
isjet2on
.
lower
())
==
"true"
):
if
((
jetfile
)
==
None
):
#I intend to run JET2 completely externally!!
#I intend to run JET2 completely externally!!
#It is too much buggy and it has too many dependencies.
#It is too much buggy and it has too many dependencies.
#Using it with a Docker or Singularity may be the best solution!
#Using it with a Docker or Singularity may be the best solution!
print
(
"computing conservation levels..."
)
print
(
"computing conservation levels..."
)
launchJET
(
prot
,
retMet
,
bFile
,
fFile
,
n
,
N
,
nl
)
launchJET
(
prot
,
retMet
,
bFile
,
fFile
,
n
,
N
,
nl
)
print
(
"done"
)
print
(
"done"
)
elif
((
isjet2on
.
lower
())
==
"false"
):
print
(
"using previously calculated JET2 conservation levels..."
)
print
(
"done"
)
else
:
else
:
print
(
"ERROR: You can only use true or false after --isjet2on!"
)
print
(
"using previously calculated JET2 data from "
+
jetfile
+
"..."
)
sys
.
exit
(
-
1
)
#Doing this copy operation just due to a peculiar behaviour of JET2.
#According to JET2, all input files must have the same name obtained
#from the fasta file right after the > symbol.
#Weird but true!
if
(
jetfile
!=
prot
+
"_jet.res"
):
shutil
.
copy2
(
jetfile
,
prot
+
"_jet.res"
)
print
(
"done"
)
launchPred
(
prot
,
inAli
,
mutFile
,
normWeightMode
)
launchPred
(
prot
,
inAli
,
mutFile
,
normWeightMode
)
#Do Python plotting here
#Do Python plotting here
...
@@ -350,7 +355,7 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, isjet2on, normWeightMode):
...
@@ -350,7 +355,7 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, isjet2on, normWeightMode):
def
main
():
def
main
():
args
=
parse_command_line
()
args
=
parse_command_line
()
doit
(
args
.
input
,
args
.
mutations
,
args
.
retrievingMethod
,
args
.
blastFile
,
\
doit
(
args
.
input
,
args
.
mutations
,
args
.
retrievingMethod
,
args
.
blastFile
,
\
args
.
fastaFile
,
args
.
nIter
,
args
.
NSeqs
,
args
.
isjet2on
,
args
.
normweightmode
)
args
.
fastaFile
,
args
.
nIter
,
args
.
NSeqs
,
args
.
jetfile
,
args
.
normweightmode
)
if
(
__name__
==
'__main__'
):
if
(
__name__
==
'__main__'
):
main
()
main
()
...
...
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