Skip to content

Commit

Permalink
Merge pull request #45 from Rappsilber-Laboratory/fschimweg-docker
Browse files Browse the repository at this point in the history
* use no-overlap k-fold
* use multiprocessing
* use cython
* fix versions
* support docker
  • Loading branch information
z3rone authored Feb 25, 2025
2 parents 9f2e53f + d63c8f5 commit 52f49bf
Show file tree
Hide file tree
Showing 27 changed files with 974 additions and 268 deletions.
21 changes: 21 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
venv*
.git
*.egg-info
build
dist
documentation
__pycache__
sample_data
tests
utils
*.pyc
*.pyo
*.pyd
.Python
.mypy_cache
.pytest_cache
.hypothesis
.tox
.coverage
.coverage.*
.cache
20 changes: 16 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.9
- name: Update and install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
gcc \
g++ \
make \
libgnutls28-dev \
libcurl4-gnutls-dev \
python3-pycurl \
libcurl4-openssl-dev \
libssl-dev
- name: Install pipenv
uses: dschep/install-pipenv-action@v1
- name: Install dependencies
Expand Down
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.7

RUN mkdir -p /app
WORKDIR /app

COPY requirements.txt .
RUN pip install -r requirements.txt

COPY setup.py .
COPY setup.cfg .
COPY xirt/ xirt/

RUN pip install .

ENTRYPOINT ["python", "-m", "xirt"]
23 changes: 23 additions & 0 deletions Dockerfile-slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM python:3.7-slim

RUN apt-get update && apt-get install -y \
gcc \
g++ \
make \
libgnutls28-dev \
libcurl4-gnutls-dev \
python3-pycurl \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /app
WORKDIR /app

COPY setup.py .
COPY setup.cfg .
COPY xirt/ xirt/
COPY requirements.txt .

RUN pip install -r requirements.txt
RUN pip install .

ENTRYPOINT ["python", "-m", "xirt"]
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "pypi"
numpy = "*"
pandas = "*"
pyteomics = "*"
sklearn = "*"
scikit-learn = "*"
tensorflow = "*"
tensorflow_addons = "*"
tqdm = "*"
Expand Down
149 changes: 149 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
absl-py==0.15.0
alabaster==0.7.13
astor==0.8.1
astunparse==1.6.3
atomicwrites==1.4.1
attrs==24.2.0
Babel==2.14.0
backcall==0.2.0
biopython==1.76
cached-property==1.5.2
cachetools==4.2.4
certifi==2025.1.31
charset-normalizer==3.4.1
clang==5.0
cloudpickle==2.2.1
coverage==7.2.7
cycler==0.11.0
Cython==3.0.12
dask==2021.7.2
decorator==5.1.1
deepmerge==1.1.1
dill==0.3.7
docutils==0.19
et-xmlfile==1.1.0
exceptiongroup==1.2.2
flake8==3.9.2
flatbuffers==1.12
fonttools==4.38.0
fsspec==2023.1.0
future==1.0.0
gast==0.4.0
google-auth==1.35.0
google-auth-oauthlib==0.4.6
google-pasta==0.2.0
graphviz==0.13.2
grpcio==1.62.3
h5py==3.1.0
idna==3.10
imagesize==1.4.1
importlib-metadata==6.7.0
iniconfig==2.0.0
ipython==6.5.0
ipython-genutils==0.2.0
jdcal==1.4.1
jedi==0.19.2
Jinja2==3.1.5
joblib==1.3.2
keras==2.6.0
Keras-Applications==1.0.8
keras-nightly==2.5.0.dev2021032900
Keras-Preprocessing==1.1.2
kiwisolver==1.4.5
libclang==18.1.1
locket==1.0.0
Markdown==3.4.4
MarkupSafe==2.1.5
matplotlib==3.5.3
mccabe==0.6.1
mdurl==0.1.2
more-itertools==9.1.0
multiprocess==0.70.15
namex==0.0.8
networkx==2.6.3
numpy==1.19.5
numpy-indexed==0.3.7
numpydoc==0.8.0
oauthlib==3.2.2
openpyxl==2.5.6
opt-einsum==3.3.0
packaging==24.0
palettable==3.3.0
pandas==1.3.5
parso==0.8.4
partd==1.4.1
pexpect==4.9.0
pickleshare==0.7.5
Pillow==9.5.0
pluggy==1.2.0
prompt-toolkit==1.0.18
protobuf==3.19.6
psutil==7.0.0
ptyprocess==0.7.0
py==1.11.0
pyasn1==0.5.1
pyasn1-modules==0.3.0
pycodestyle==2.7.0
pycurl==7.43.0.2
pydocstyle==6.1.1
pydot==1.4.1
pyflakes==2.3.1
Pygments==2.17.2
pyparsing==3.1.4
pyteomics==4.7.5
pytest==7.4.4
pytest-arraydiff==0.2
pytest-astropy==0.4.0
pytest-cov==4.1.0
pytest-doctestplus==0.1.3
pytest-flake8==1.1.0
pytest-openfiles==0.3.0
pytest-pydocstyle==2.3.2
pytest-remotedata==0.3.0
python-dateutil==2.9.0.post0
pytz==2025.1
PyWavelets==1.3.0
PyYAML==6.0.1
requests==2.31.0
requests-oauthlib==2.0.0
rsa==4.9
scikit-image==0.14.2
scikit-learn==0.22.2.post1
scipy==1.7.3
seaborn==0.12.2
setuptools-scm==7.1.0
simplegeneric==0.8.1
six==1.15.0
snowballstemmer==2.2.0
Sphinx==5.3.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
statannot==0.2.3
tensorboard==2.9.1
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
tensorflow==2.6.0
tensorflow-addons==0.13.0
tensorflow-estimator==2.9.0
tensorflow-io-gcs-filesystem==0.34.0
termcolor==1.1.0
tomli==2.0.1
toolz==0.12.1
tqdm==4.67.1
traitlets==5.9.0
typeguard==2.7.0
typing-extensions==3.7.4.3
tzdata==2025.1
urllib3==1.23
versioneer==0.29
wcwidth==0.2.13
Werkzeug==2.2.3
wrapt==1.12.1
xiutilities>=1.2.5
xlrd==2.0.1
xlwt==1.3.0
zipp==3.15.0
68 changes: 68 additions & 0 deletions requirements_fschimweg.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
absl-py==1.4.0
astunparse==1.6.3
biopython==1.81
cachetools==5.3.1
certifi==2023.7.22
charset-normalizer==3.2.0
contourpy==1.1.0
cycler==0.11.0
flatbuffers==23.5.26
fonttools==4.42.0
gast==0.4.0
google-auth==2.22.0
google-auth-oauthlib==1.0.0
google-pasta==0.2.0
graphviz==0.20.1
grpcio==1.56.2
h5py==3.9.0
idna==3.4
joblib==1.3.2
keras==2.13.1
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
kiwisolver==1.4.4
libclang==16.0.6
Markdown==3.4.4
MarkupSafe==2.1.3
matplotlib==3.7.2
numpy==1.24.3
oauthlib==3.2.2
opt-einsum==3.3.0
packaging==23.1
palettable==3.3.3
pandas==2.0.3
Pillow==10.0.0
protobuf==4.24.0
pyasn1==0.5.0
pyasn1-modules==0.3.0
pydot==1.4.2
pyparsing==3.0.9
pyteomics==4.6
python-dateutil==2.8.2
pytz==2023.3
PyYAML==6.0.1
requests==2.31.0
requests-oauthlib==1.3.1
rsa==4.9
scikit-learn==1.3.0
scipy==1.11.1
seaborn==0.12.2
six==1.16.0
sklearn==0.0.post7
statannot==0.2.3
tensorboard==2.13.0
tensorboard-data-server==0.7.1
tensorflow==2.13.0
tensorflow-addons==0.21.0
tensorflow-estimator==2.13.0
tensorflow-macos==2.13.0
termcolor==2.3.0
threadpoolctl==3.2.0
tqdm==4.66.0
typeguard==2.13.3
typing_extensions==4.5.0
tzdata==2023.3
urllib3==1.26.16
Werkzeug==2.3.6
wrapt==1.15.0
xlwt==1.3.0
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool:pytest]
pep8maxlinelength = 100
flake8-max-line-length = 100
addopts = --flake8 --pydocstyle --cov=xirt --cov-fail-under=90 --cov-report html --disable-warnings -n 8
addopts = --flake8 --pydocstyle --cov=xirt --cov-fail-under=90 --cov-report html --disable-warnings
norecursedirs = HILIC utils documentation

[flake8]
Expand Down
11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,18 @@
"Chromatography", "Peptides"]
RAPPSILBER_SOFTWARE = "https://www.rappsilberlab.org/software/"
# What packages are required for this module to be executed?
REQUIRED = ['numpy', 'pandas', 'tensorflow', 'seaborn', 'xlwt', 'pyyaml',
'pyteomics', 'sklearn', 'tqdm', 'biopython', 'palettable', 'statannot',
REQUIRED = ['numpy', 'pandas', 'tensorflow', 'seaborn', 'xlwt', 'graphviz', 'pydot', 'pyyaml',
'pyteomics', 'scikit-learn', 'tqdm', 'biopython', 'pydot', 'palettable', 'statannot',
'tensorflow_addons']

# What packages are optional?
# 'fancy feature': ['django'],}
EXTRAS = {}
EXTRAS = {
'develop': [
'pytest>=2.8.6',
'flake8>=2.5.2'
]
}

# The rest you shouldn't have to touch too much :)
# ------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions tests/fixtures/xirt_params_3RT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,10 @@ predictions:
fractions: # simply write fractions: [] if no fraction prediction is desired
- scx
- hsax
column_names:
peptide1_sequence: "Peptide1"
peptide2_sequence: "Peptide2"
link_pos_basename: "LinkPos"
peptide1_unmod_sequence: "Peptide1"
peptide2_unmod_sequence: "Peptide2"
score: "score"
7 changes: 7 additions & 0 deletions tests/fixtures/xirt_params_rp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,10 @@ predictions:
- rp
# simply write fractions: [] if no fraction prediction is desired
fractions: []
column_names:
peptide1_sequence: "Peptide1"
peptide2_sequence: "Peptide2"
link_pos_basename: "LinkPos"
peptide1_unmod_sequence: "Peptide1"
peptide2_unmod_sequence: "Peptide2"
score: "score"
7 changes: 7 additions & 0 deletions tests/fixtures/xirt_params_rp_linear.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,10 @@ predictions:
- rp
# simply write fractions: [] if no fraction prediction is desired
fractions: []
column_names:
peptide1_sequence: "Peptide1"
peptide2_sequence: "Peptide2"
link_pos_basename: "LinkPos"
peptide1_unmod_sequence: "Peptide1"
peptide2_unmod_sequence: "Peptide2"
score: "score"
7 changes: 7 additions & 0 deletions tests/fixtures/xirt_params_scx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,10 @@ predictions:
continues: []
# simply write fractions: [] if no fraction prediction is desired
fractions: [scx]
column_names:
peptide1_sequence: "Peptide1"
peptide2_sequence: "Peptide2"
link_pos_basename: "LinkPos"
peptide1_unmod_sequence: "Peptide1"
peptide2_unmod_sequence: "Peptide2"
score: "score"
Loading

0 comments on commit 52f49bf

Please sign in to comment.