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
6e9d1633
Commit
6e9d1633
authored
Jul 26, 2023
by
Konstantin Volzhenin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Version 0.1.1 (minor edits + requirements)
parent
073430ee
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
138 additions
and
9 deletions
+138
-9
.gitignore
.gitignore
+128
-0
__init__.py
senseppi/__init__.py
+1
-1
predict_string.py
senseppi/commands/predict_string.py
+7
-8
setup.py
setup.py
+2
-0
No files found.
.gitignore
View file @
6e9d1633
# Editors
.vscode/
.idea/
# Vagrant
.vagrant/
# Mac/OSX
.DS_Store
# Windows
Thumbs.db
# Source for the following rules: https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
/esm2_embs_3B
*.sh
draft.py
\ No newline at end of file
senseppi/__init__.py
View file @
6e9d1633
__version__
=
"0.1.
0
"
__version__
=
"0.1.
1
"
__author__
=
"Konstantin Volzhenin"
from
.
import
model
,
commands
,
esm2_model
,
dataset
,
utils
,
network_utils
...
...
senseppi/commands/predict_string.py
View file @
6e9d1633
import
os
from
torch.utils.data
import
DataLoader
import
pytorch_lightning
as
pl
from
torchmetrics
import
AUROC
,
Accuracy
,
Precision
,
Recall
,
F1Score
,
MatthewsCorrCoef
...
...
@@ -9,7 +7,7 @@ import matplotlib
from
matplotlib.lines
import
Line2D
from
scipy.cluster.hierarchy
import
linkage
,
fcluster
from
matplotlib.patches
import
Rectangle
import
argparse
import
matplotlib.pyplot
as
plt
import
glob
...
...
@@ -225,12 +223,12 @@ def main(params):
node_color
=
[
G
.
nodes
[
node
][
'color'
]
for
node
in
G
.
nodes
()])
legend_elements
=
[
Line2D
([
0
],
[
0
],
marker
=
'_'
,
color
=
'darkblue'
,
label
=
'PP from training data'
,
markerfacecolor
=
'darkblue'
,
markersize
=
10
),
#
Line2D([0], [0], marker='_', color='darkblue', label='PP from training data', markerfacecolor='darkblue',
#
markersize=10),
Line2D
([
0
],
[
0
],
marker
=
'_'
,
color
=
'limegreen'
,
label
=
'PP'
,
markerfacecolor
=
'limegreen'
,
markersize
=
10
),
Line2D
([
0
],
[
0
],
marker
=
'_'
,
color
=
'red'
,
label
=
'FP'
,
markerfacecolor
=
'red'
,
markersize
=
10
)
]
#
Line2D([0], [0], marker='_', color='black', label='FN - based on STRING', markerfacecolor='black',
#
markersize=10, linestyle='dotted')]
Line2D
([
0
],
[
0
],
marker
=
'_'
,
color
=
'red'
,
label
=
'FP'
,
markerfacecolor
=
'red'
,
markersize
=
10
)
,
Line2D
([
0
],
[
0
],
marker
=
'_'
,
color
=
'black'
,
label
=
'FN - based on STRING'
,
markerfacecolor
=
'black'
,
markersize
=
10
,
linestyle
=
'dotted'
)]
plt
.
legend
(
handles
=
legend_elements
,
loc
=
'upper right'
,
bbox_to_anchor
=
(
1.2
,
0.0
),
ncol
=
1
,
fontsize
=
8
)
savepath
=
'{}_graph_{}_{}.pdf'
.
format
(
params
.
output
,
'_'
.
join
(
params
.
genes
),
params
.
species
)
...
...
@@ -277,6 +275,7 @@ def add_args(parser):
add_esm_args
(
parser
)
return
parser
if
__name__
==
'__main__'
:
parser
=
argparse
.
ArgumentParser
()
parser
=
add_args
(
parser
)
...
...
setup.py
View file @
6e9d1633
...
...
@@ -21,6 +21,8 @@ setup(
"numpy"
,
"pandas"
,
"wget"
,
"scipy"
,
"networkx"
,
"torch>=1.12"
,
"matplotlib"
,
"seaborn"
,
...
...
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