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
78f70acf
Commit
78f70acf
authored
Aug 08, 2023
by
Konstantin Volzhenin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.2.2 fixed tsv bug in predict
parent
4b1847e2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
.gitignore
.gitignore
+2
-0
__init__.py
senseppi/__init__.py
+1
-1
predict.py
senseppi/commands/predict.py
+10
-3
No files found.
.gitignore
View file @
78f70acf
...
...
@@ -127,3 +127,5 @@ dmypy.json
/esm2_embs_3B
*.sh
draft.py
/data/string_species/mmseqs_dbs/
/data/human_virus/all_test_viruses.csv
senseppi/__init__.py
View file @
78f70acf
__version__
=
"0.2.
1
"
__version__
=
"0.2.
2
"
__author__
=
"Konstantin Volzhenin"
from
.
import
model
,
commands
,
esm2_model
,
dataset
,
utils
,
network_utils
...
...
senseppi/commands/predict.py
View file @
78f70acf
...
...
@@ -99,13 +99,20 @@ def main(params):
logging
.
info
(
'Predicting...'
)
preds
=
predict
(
params
)
data
=
pd
.
read_csv
(
params
.
pairs_file
,
delimiter
=
'
\t
'
,
names
=
[
"seq1"
,
"seq2"
])
data
=
pd
.
read_csv
(
params
.
pairs_file
,
delimiter
=
'
\t
'
)
#if 3 columns, then assign names ['seq1', 'seq2', 'label'] if 2 columns, then names ['seq1', 'seq2']
if
len
(
data
.
columns
)
==
3
:
data
.
columns
=
[
'seq1'
,
'seq2'
,
'label'
]
elif
len
(
data
.
columns
)
==
2
:
data
.
columns
=
[
'seq1'
,
'seq2'
]
else
:
raise
ValueError
(
'The pairs file must have 2 or 3 columns: seq1, seq2 and label(optional)'
)
data
[
'preds'
]
=
preds
data
.
to_csv
(
params
.
output
+
'.tsv'
,
sep
=
'
\t
'
,
index
=
False
,
header
=
Fals
e
)
data
.
to_csv
(
params
.
output
+
'.tsv'
,
sep
=
'
\t
'
,
index
=
False
,
header
=
Tru
e
)
data_positive
=
data
[
data
[
'preds'
]
>=
params
.
pred_threshold
]
data_positive
.
to_csv
(
params
.
output
+
'_positive_interactions.tsv'
,
sep
=
'
\t
'
,
index
=
False
,
header
=
Fals
e
)
data_positive
.
to_csv
(
params
.
output
+
'_positive_interactions.tsv'
,
sep
=
'
\t
'
,
index
=
False
,
header
=
Tru
e
)
if
__name__
==
'__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