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
aabe1568
Commit
aabe1568
authored
Mar 08, 2023
by
Mustafa Tekpinar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed SGEMME_PATH to ESGEMME_PATH
parent
e7a02f1e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
computePred.R
computePred.R
+2
-2
esgemme.py
esgemme.py
+3
-3
pred.R
pred.R
+2
-2
No files found.
computePred.R
View file @
aabe1568
...
@@ -6,13 +6,13 @@
...
@@ -6,13 +6,13 @@
# Usage: Rscript --save computePred.R XXXX
# Usage: Rscript --save computePred.R XXXX
library
(
"seqinr"
)
library
(
"seqinr"
)
source
(
paste
(
Sys.getenv
(
"SGEMME_PATH"
),
"/pred.R"
,
sep
=
""
))
source
(
paste
(
Sys.getenv
(
"
E
SGEMME_PATH"
),
"/pred.R"
,
sep
=
""
))
# amino acid full alphabet
# amino acid full alphabet
aa
=
c
(
"a"
,
"c"
,
"d"
,
"e"
,
"f"
,
"g"
,
"h"
,
"i"
,
"k"
,
"l"
,
"m"
,
"n"
,
"p"
,
"q"
,
"r"
,
"s"
,
"t"
,
"v"
,
"w"
,
"y"
)
aa
=
c
(
"a"
,
"c"
,
"d"
,
"e"
,
"f"
,
"g"
,
"h"
,
"i"
,
"k"
,
"l"
,
"m"
,
"n"
,
"p"
,
"q"
,
"r"
,
"s"
,
"t"
,
"v"
,
"w"
,
"y"
)
# BLOSUM62 matrix
# BLOSUM62 matrix
blosum62p
=
as.matrix
(
read.table
(
paste0
(
Sys.getenv
(
"SGEMME_PATH"
),
"/blosum62p.txt"
),
row.names
=
1
))
blosum62p
=
as.matrix
(
read.table
(
paste0
(
Sys.getenv
(
"
E
SGEMME_PATH"
),
"/blosum62p.txt"
),
row.names
=
1
))
bgp
=
blosum62p
[
order
(
rownames
(
blosum62p
)),
order
(
colnames
(
blosum62p
))]
bgp
=
blosum62p
[
order
(
rownames
(
blosum62p
)),
order
(
colnames
(
blosum62p
))]
bg
=
apply
(
bgp
,
1
,
sum
)
bg
=
apply
(
bgp
,
1
,
sum
)
...
...
sgemme.py
→
e
sgemme.py
View file @
aabe1568
...
@@ -141,7 +141,7 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl):
...
@@ -141,7 +141,7 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl):
chainID
=
chains
[
0
]
chainID
=
chains
[
0
]
#TODO: Remove Bash dependency here. Make the copying process in Python
#TODO: Remove Bash dependency here. Make the copying process in Python
subprocess
.
call
(
"cp $SGEMME_PATH/default.conf ."
,
shell
=
True
)
subprocess
.
call
(
"cp $
E
SGEMME_PATH/default.conf ."
,
shell
=
True
)
if
retMet
==
"input"
:
if
retMet
==
"input"
:
if
bFile
!=
''
:
if
bFile
!=
''
:
...
@@ -236,11 +236,11 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl):
...
@@ -236,11 +236,11 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl):
# Run Rscript to compute predictions
# Run Rscript to compute predictions
def
launchPred
(
prot
,
inAli
,
mutFile
,
normWeightMode
,
alphabet
):
def
launchPred
(
prot
,
inAli
,
mutFile
,
normWeightMode
,
alphabet
):
if
(
mutFile
!=
''
):
if
(
mutFile
!=
''
):
rcmd
=
"Rscript --save $SGEMME_PATH/computePred.R "
+
prot
+
" "
+
inAli
+
" FALSE "
+
mutFile
+
" "
+
normWeightMode
+
" "
+
alphabet
rcmd
=
"Rscript --save $
E
SGEMME_PATH/computePred.R "
+
prot
+
" "
+
inAli
+
" FALSE "
+
mutFile
+
" "
+
normWeightMode
+
" "
+
alphabet
#TODO: remember that there is a problem here!!!!
#TODO: remember that there is a problem here!!!!
else
:
else
:
rcmd
=
"Rscript --save $SGEMME_PATH/computePred.R "
+
prot
+
" "
+
inAli
+
" TRUE none "
+
normWeightMode
+
" "
+
alphabet
rcmd
=
"Rscript --save $
E
SGEMME_PATH/computePred.R "
+
prot
+
" "
+
inAli
+
" TRUE none "
+
normWeightMode
+
" "
+
alphabet
print
(
"
\n
Running:
\n
"
+
rcmd
)
print
(
"
\n
Running:
\n
"
+
rcmd
)
reCode
=
subprocess
.
call
(
rcmd
,
shell
=
True
)
reCode
=
subprocess
.
call
(
rcmd
,
shell
=
True
)
...
...
pred.R
View file @
aabe1568
...
@@ -174,7 +174,7 @@ computePSSM2<-function(mat){
...
@@ -174,7 +174,7 @@ computePSSM2<-function(mat){
}
}
computeNbSeqsAlph
<-
function
(
nbSeqs
,
alphabet
){
computeNbSeqsAlph
<-
function
(
nbSeqs
,
alphabet
){
path
=
paste
(
Sys.getenv
(
"SGEMME_PATH"
),
"/alphabets/"
,
sep
=
""
)
path
=
paste
(
Sys.getenv
(
"
E
SGEMME_PATH"
),
"/alphabets/"
,
sep
=
""
)
AA
=
read.table
(
paste
(
path
,
alphabet
,
".txt"
,
sep
=
""
))
$
V
1
AA
=
read.table
(
paste
(
path
,
alphabet
,
".txt"
,
sep
=
""
))
$
V
1
facAA
=
rep
(
NA
,
20
)
facAA
=
rep
(
NA
,
20
)
for
(
Let
in
AA
){
for
(
Let
in
AA
){
...
@@ -210,7 +210,7 @@ readMut<-function(fname){
...
@@ -210,7 +210,7 @@ readMut<-function(fname){
}
}
which.class
<-
function
(
a
,
alphabet
){
which.class
<-
function
(
a
,
alphabet
){
path
=
paste
(
Sys.getenv
(
"SGEMME_PATH"
),
"/alphabets/"
,
sep
=
""
)
path
=
paste
(
Sys.getenv
(
"
E
SGEMME_PATH"
),
"/alphabets/"
,
sep
=
""
)
AA
=
read.table
(
paste
(
path
,
alphabet
,
".txt"
,
sep
=
""
))
$
V
1
AA
=
read.table
(
paste
(
path
,
alphabet
,
".txt"
,
sep
=
""
))
$
V
1
for
(
Let
in
AA
){
for
(
Let
in
AA
){
Let
=
toString
(
Let
)
Let
=
toString
(
Let
)
...
...
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