Version 0.1.1 (minor edits + requirements)

parent 073430ee
# 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 /esm2_embs_3B
*.sh *.sh
\ No newline at end of file draft.py
\ No newline at end of file
__version__ = "0.1.0" __version__ = "0.1.1"
__author__ = "Konstantin Volzhenin" __author__ = "Konstantin Volzhenin"
from . import model, commands, esm2_model, dataset, utils, network_utils from . import model, commands, esm2_model, dataset, utils, network_utils
......
import os
from torch.utils.data import DataLoader from torch.utils.data import DataLoader
import pytorch_lightning as pl import pytorch_lightning as pl
from torchmetrics import AUROC, Accuracy, Precision, Recall, F1Score, MatthewsCorrCoef from torchmetrics import AUROC, Accuracy, Precision, Recall, F1Score, MatthewsCorrCoef
...@@ -9,7 +7,7 @@ import matplotlib ...@@ -9,7 +7,7 @@ import matplotlib
from matplotlib.lines import Line2D from matplotlib.lines import Line2D
from scipy.cluster.hierarchy import linkage, fcluster from scipy.cluster.hierarchy import linkage, fcluster
from matplotlib.patches import Rectangle from matplotlib.patches import Rectangle
import argparse
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import glob import glob
...@@ -225,12 +223,12 @@ def main(params): ...@@ -225,12 +223,12 @@ def main(params):
node_color=[G.nodes[node]['color'] for node in G.nodes()]) node_color=[G.nodes[node]['color'] for node in G.nodes()])
legend_elements = [ legend_elements = [
Line2D([0], [0], marker='_', color='darkblue', label='PP from training data', markerfacecolor='darkblue', # Line2D([0], [0], marker='_', color='darkblue', label='PP from training data', markerfacecolor='darkblue',
markersize=10), # markersize=10),
Line2D([0], [0], marker='_', color='limegreen', label='PP', markerfacecolor='limegreen', 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='red', label='FP', markerfacecolor='red', markersize=10),
# Line2D([0], [0], marker='_', color='black', label='FN - based on STRING', markerfacecolor='black', Line2D([0], [0], marker='_', color='black', label='FN - based on STRING', markerfacecolor='black',
# markersize=10, linestyle='dotted')] markersize=10, linestyle='dotted')]
plt.legend(handles=legend_elements, loc='upper right', bbox_to_anchor=(1.2, 0.0), ncol=1, fontsize=8) 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) savepath = '{}_graph_{}_{}.pdf'.format(params.output, '_'.join(params.genes), params.species)
...@@ -277,6 +275,7 @@ def add_args(parser): ...@@ -277,6 +275,7 @@ def add_args(parser):
add_esm_args(parser) add_esm_args(parser)
return parser return parser
if __name__ == '__main__': if __name__ == '__main__':
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser = add_args(parser) parser = add_args(parser)
......
...@@ -21,6 +21,8 @@ setup( ...@@ -21,6 +21,8 @@ setup(
"numpy", "numpy",
"pandas", "pandas",
"wget", "wget",
"scipy",
"networkx",
"torch>=1.12", "torch>=1.12",
"matplotlib", "matplotlib",
"seaborn", "seaborn",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment