Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SENSE-PPI
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
Konstantin Volzhenin
SENSE-PPI
Commits
15fc56cf
Commit
15fc56cf
authored
Jul 26, 2023
by
Konstantin Volzhenin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.1.5
output contains gene names instead of STRING IDs
parent
a3873ec7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
__init__.py
senseppi/__init__.py
+1
-1
predict_string.py
senseppi/commands/predict_string.py
+6
-1
No files found.
senseppi/__init__.py
View file @
15fc56cf
__version__
=
"0.1.
4
"
__version__
=
"0.1.
5
"
__author__
=
"Konstantin Volzhenin"
from
.
import
model
,
commands
,
esm2_model
,
dataset
,
utils
,
network_utils
...
...
senseppi/commands/predict_string.py
View file @
15fc56cf
...
...
@@ -62,7 +62,6 @@ def main(params):
data
[
'preds'
]
=
preds
print
(
data
.
sort_values
(
by
=
[
'preds'
],
ascending
=
False
)
.
to_string
())
data
.
to_csv
(
params
.
output
+
'.tsv'
,
sep
=
'
\t
'
,
index
=
False
)
# Calculate torch metrics based on data['binary_label'] and data['preds']
torch_labels
=
torch
.
tensor
(
data
[
'binary_label'
])
...
...
@@ -82,6 +81,12 @@ def main(params):
string_ids
[
row
[
'stringId_A'
]]
=
row
[
'preferredName_A'
]
string_ids
[
row
[
'stringId_B'
]]
=
row
[
'preferredName_B'
]
data_to_save
=
data
.
copy
()
data_to_save
[
'seq1'
]
=
data_to_save
[
'seq1'
]
.
apply
(
lambda
x
:
string_ids
[
x
])
data_to_save
[
'seq2'
]
=
data_to_save
[
'seq2'
]
.
apply
(
lambda
x
:
string_ids
[
x
])
data_to_save
=
data_to_save
.
sort_values
(
by
=
[
'preds'
],
ascending
=
False
)
data_to_save
.
to_csv
(
params
.
output
+
'.tsv'
,
sep
=
'
\t
'
,
index
=
False
)
# This part was needed to color the pairs belonging to the train data, temporarily removed
# print('Fetching gene names for training set from STRING...')
...
...
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