netzoopy-sponge 0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- netzoopy_sponge-0.0/.dockerignore +33 -0
- netzoopy_sponge-0.0/.github/workflows/publish_package.yaml +75 -0
- netzoopy_sponge-0.0/.github/workflows/publish_pypi.yaml +44 -0
- netzoopy_sponge-0.0/.github/workflows/publish_testpypi.yaml +42 -0
- netzoopy_sponge-0.0/.github/workflows/test.yaml +47 -0
- netzoopy_sponge-0.0/.github/workflows/test_testpypi_install.yaml +52 -0
- netzoopy_sponge-0.0/Dockerfile +55 -0
- netzoopy_sponge-0.0/LICENSE +674 -0
- netzoopy_sponge-0.0/PKG-INFO +312 -0
- netzoopy_sponge-0.0/README.md +290 -0
- netzoopy_sponge-0.0/netzoopy_sponge.egg-info/PKG-INFO +312 -0
- netzoopy_sponge-0.0/netzoopy_sponge.egg-info/SOURCES.txt +65 -0
- netzoopy_sponge-0.0/netzoopy_sponge.egg-info/dependency_links.txt +1 -0
- netzoopy_sponge-0.0/netzoopy_sponge.egg-info/entry_points.txt +2 -0
- netzoopy_sponge-0.0/netzoopy_sponge.egg-info/requires.txt +7 -0
- netzoopy_sponge-0.0/netzoopy_sponge.egg-info/top_level.txt +1 -0
- netzoopy_sponge-0.0/pyproject.toml +69 -0
- netzoopy_sponge-0.0/requirements.txt +8 -0
- netzoopy_sponge-0.0/run_sponge.py +8 -0
- netzoopy_sponge-0.0/setup.cfg +4 -0
- netzoopy_sponge-0.0/sponge/__init__.py +1 -0
- netzoopy_sponge-0.0/sponge/cli.py +84 -0
- netzoopy_sponge-0.0/sponge/config.yaml +62 -0
- netzoopy_sponge-0.0/sponge/config_manager.py +313 -0
- netzoopy_sponge-0.0/sponge/modules/__init__.py +0 -0
- netzoopy_sponge-0.0/sponge/modules/analysis/__init__.py +1 -0
- netzoopy_sponge-0.0/sponge/modules/analysis/analysis.py +162 -0
- netzoopy_sponge-0.0/sponge/modules/data_retriever/__init__.py +1 -0
- netzoopy_sponge-0.0/sponge/modules/data_retriever/data_retriever.py +120 -0
- netzoopy_sponge-0.0/sponge/modules/data_retriever/file_retriever.py +141 -0
- netzoopy_sponge-0.0/sponge/modules/data_retriever/region_retriever.py +180 -0
- netzoopy_sponge-0.0/sponge/modules/data_retriever/tfbs_retriever.py +109 -0
- netzoopy_sponge-0.0/sponge/modules/file_writer/__init__.py +1 -0
- netzoopy_sponge-0.0/sponge/modules/file_writer/file_writer.py +61 -0
- netzoopy_sponge-0.0/sponge/modules/match_aggregator/__init__.py +1 -0
- netzoopy_sponge-0.0/sponge/modules/match_aggregator/match_aggregator.py +132 -0
- netzoopy_sponge-0.0/sponge/modules/match_filter/__init__.py +1 -0
- netzoopy_sponge-0.0/sponge/modules/match_filter/match_filter.py +182 -0
- netzoopy_sponge-0.0/sponge/modules/motif_selector/__init__.py +1 -0
- netzoopy_sponge-0.0/sponge/modules/motif_selector/homology_retriever.py +244 -0
- netzoopy_sponge-0.0/sponge/modules/motif_selector/jaspar_retriever.py +147 -0
- netzoopy_sponge-0.0/sponge/modules/motif_selector/motif_selector.py +140 -0
- netzoopy_sponge-0.0/sponge/modules/ppi_retriever/__init__.py +1 -0
- netzoopy_sponge-0.0/sponge/modules/ppi_retriever/ppi_retriever.py +177 -0
- netzoopy_sponge-0.0/sponge/modules/protein_id_mapper/__init__.py +1 -0
- netzoopy_sponge-0.0/sponge/modules/protein_id_mapper/protein_id_mapper.py +115 -0
- netzoopy_sponge-0.0/sponge/modules/utils/__init__.py +6 -0
- netzoopy_sponge-0.0/sponge/modules/utils/data_retrieval.py +248 -0
- netzoopy_sponge-0.0/sponge/modules/utils/dictionary_update.py +54 -0
- netzoopy_sponge-0.0/sponge/modules/utils/jaspar_versioning.py +70 -0
- netzoopy_sponge-0.0/sponge/modules/utils/motif_information.py +72 -0
- netzoopy_sponge-0.0/sponge/modules/utils/string_manipulation.py +68 -0
- netzoopy_sponge-0.0/sponge/modules/utils/tfbs_filtering.py +346 -0
- netzoopy_sponge-0.0/sponge/modules/version_logger/__init__.py +1 -0
- netzoopy_sponge-0.0/sponge/modules/version_logger/version_logger.py +288 -0
- netzoopy_sponge-0.0/sponge/sponge.py +316 -0
- netzoopy_sponge-0.0/sponge/user_config.yaml +35 -0
- netzoopy_sponge-0.0/tests/sponge/JASPAR.bb +0 -0
- netzoopy_sponge-0.0/tests/sponge/chr19_subset.bb +0 -0
- netzoopy_sponge-0.0/tests/sponge/chr19_subset.tsv +191 -0
- netzoopy_sponge-0.0/tests/sponge/comp_motif_prior_1.tsv +5 -0
- netzoopy_sponge-0.0/tests/sponge/comp_motif_prior_2.tsv +5 -0
- netzoopy_sponge-0.0/tests/sponge/foxf2_chr19_subset.tsv +1648 -0
- netzoopy_sponge-0.0/tests/sponge/test_motif_prior.tsv +715 -0
- netzoopy_sponge-0.0/tests/sponge/test_ppi_prior.tsv +1 -0
- netzoopy_sponge-0.0/tests/sponge/test_user_config.yaml +33 -0
- netzoopy_sponge-0.0/tests/test_sponge.py +442 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Include any files or directories that you don't want to be copied to your
|
|
2
|
+
# container here (e.g., local build artifacts, temporary files, etc.).
|
|
3
|
+
#
|
|
4
|
+
# For more help, visit the .dockerignore file reference guide at
|
|
5
|
+
# https://docs.docker.com/go/build-context-dockerignore/
|
|
6
|
+
|
|
7
|
+
**/.DS_Store
|
|
8
|
+
**/__pycache__
|
|
9
|
+
**/.venv
|
|
10
|
+
**/.classpath
|
|
11
|
+
**/.dockerignore
|
|
12
|
+
**/.env
|
|
13
|
+
**/.git
|
|
14
|
+
**/.gitignore
|
|
15
|
+
**/.project
|
|
16
|
+
**/.settings
|
|
17
|
+
**/.toolstarget
|
|
18
|
+
**/.vs
|
|
19
|
+
**/.vscode
|
|
20
|
+
**/*.*proj.user
|
|
21
|
+
**/*.dbmdl
|
|
22
|
+
**/*.jfm
|
|
23
|
+
**/bin
|
|
24
|
+
**/charts
|
|
25
|
+
**/docker-compose*
|
|
26
|
+
**/compose.y*ml
|
|
27
|
+
**/Dockerfile*
|
|
28
|
+
**/node_modules
|
|
29
|
+
**/npm-debug.log
|
|
30
|
+
**/obj
|
|
31
|
+
**/secrets.dev.yaml
|
|
32
|
+
**/values.dev.yaml
|
|
33
|
+
README.md
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: SPONGE GHCR package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows:
|
|
6
|
+
- SPONGE PyPI upload
|
|
7
|
+
types:
|
|
8
|
+
- completed
|
|
9
|
+
|
|
10
|
+
env:
|
|
11
|
+
IMAGE_NAME: netzoopy_sponge
|
|
12
|
+
VERSION_FILE: version.txt
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
push:
|
|
16
|
+
name: Push package to GHCR
|
|
17
|
+
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
|
|
20
|
+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
21
|
+
|
|
22
|
+
permissions:
|
|
23
|
+
actions: read
|
|
24
|
+
contents: read
|
|
25
|
+
packages: write
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout repository
|
|
29
|
+
uses: actions/checkout@v4
|
|
30
|
+
|
|
31
|
+
- name: Build image
|
|
32
|
+
run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
|
|
33
|
+
|
|
34
|
+
- name: Check basic functionality
|
|
35
|
+
run: docker run $IMAGE_NAME --help
|
|
36
|
+
|
|
37
|
+
- name: Download the artifact with the version
|
|
38
|
+
uses: dawidd6/action-download-artifact@v9
|
|
39
|
+
with:
|
|
40
|
+
name: version
|
|
41
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
42
|
+
workflow: test_testpypi_install.yaml
|
|
43
|
+
workflow_conclusion: success
|
|
44
|
+
|
|
45
|
+
- name: Check the downloaded file
|
|
46
|
+
run: |
|
|
47
|
+
ls -lah
|
|
48
|
+
cat $VERSION_FILE
|
|
49
|
+
|
|
50
|
+
- name: Log in to registry
|
|
51
|
+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
|
52
|
+
|
|
53
|
+
- name: Push images
|
|
54
|
+
run: |
|
|
55
|
+
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
|
|
56
|
+
|
|
57
|
+
# This changes all uppercase characters to lowercase
|
|
58
|
+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
|
59
|
+
|
|
60
|
+
VERSION=$(cat $VERSION_FILE)
|
|
61
|
+
|
|
62
|
+
# This strips the "v" prefix from the tag name
|
|
63
|
+
[[ $VERSION =~ v[0-9]+.[0-9]+.[0-9]+ ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
|
64
|
+
|
|
65
|
+
# Show the derived image ID and version
|
|
66
|
+
echo IMAGE_ID=$IMAGE_ID
|
|
67
|
+
echo VERSION=$VERSION
|
|
68
|
+
|
|
69
|
+
# Push the with the version tag
|
|
70
|
+
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
|
|
71
|
+
docker push $IMAGE_ID:$VERSION
|
|
72
|
+
|
|
73
|
+
# Push with the latest tag
|
|
74
|
+
docker tag $IMAGE_NAME $IMAGE_ID:latest
|
|
75
|
+
docker push $IMAGE_ID:latest
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: SPONGE PyPI upload
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows:
|
|
6
|
+
- SPONGE TestPyPI installation test
|
|
7
|
+
types:
|
|
8
|
+
- completed
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
pypi-publish:
|
|
12
|
+
name: Publish release to PyPI
|
|
13
|
+
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
17
|
+
|
|
18
|
+
environment:
|
|
19
|
+
name: pypi
|
|
20
|
+
url: https://pypi.org/p/netzoopy-sponge
|
|
21
|
+
|
|
22
|
+
permissions:
|
|
23
|
+
id-token: write
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout repository
|
|
27
|
+
uses: actions/checkout@v4
|
|
28
|
+
|
|
29
|
+
- name: Set up Python
|
|
30
|
+
uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: '3.10'
|
|
33
|
+
|
|
34
|
+
- name: Install dependencies
|
|
35
|
+
run: |
|
|
36
|
+
python -m pip install --upgrade pip
|
|
37
|
+
pip install build setuptools wheel
|
|
38
|
+
|
|
39
|
+
- name: Build package
|
|
40
|
+
run: |
|
|
41
|
+
python -m build
|
|
42
|
+
|
|
43
|
+
- name: Publish package distributions to PyPI
|
|
44
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: SPONGE TestPyPI upload
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types:
|
|
6
|
+
- released
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
testpypi-publish:
|
|
10
|
+
name: Publish release to TestPyPI
|
|
11
|
+
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
environment:
|
|
15
|
+
name: pypi
|
|
16
|
+
url: https://test.pypi.org/p/netzoopy-sponge
|
|
17
|
+
|
|
18
|
+
permissions:
|
|
19
|
+
id-token: write
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout repository
|
|
23
|
+
uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Set up Python
|
|
26
|
+
uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: '3.10'
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: |
|
|
32
|
+
python -m pip install --upgrade pip
|
|
33
|
+
pip install build setuptools wheel
|
|
34
|
+
|
|
35
|
+
- name: Build package
|
|
36
|
+
run: |
|
|
37
|
+
python -m build
|
|
38
|
+
|
|
39
|
+
- name: Publish package distributions to PyPI
|
|
40
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
41
|
+
with:
|
|
42
|
+
repository-url: https://test.pypi.org/legacy/
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: SPONGE tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- devel
|
|
8
|
+
pull_request:
|
|
9
|
+
branches:
|
|
10
|
+
- main
|
|
11
|
+
- devel
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
os-python-compatibility:
|
|
16
|
+
name: Test SPONGE on multiple OS and Python versions
|
|
17
|
+
|
|
18
|
+
strategy:
|
|
19
|
+
matrix:
|
|
20
|
+
os: [ 'ubuntu-latest', 'macos-latest' ]
|
|
21
|
+
python: [ '3.9', '3.10', '3.11', '3.12' ]
|
|
22
|
+
|
|
23
|
+
runs-on: ${{ matrix.os }}
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout repository
|
|
27
|
+
uses: actions/checkout@v4
|
|
28
|
+
|
|
29
|
+
- name: Setup Python
|
|
30
|
+
uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: ${{ matrix.python }}
|
|
33
|
+
|
|
34
|
+
- name: Check Python version
|
|
35
|
+
run: |
|
|
36
|
+
which python3
|
|
37
|
+
python3 --version
|
|
38
|
+
|
|
39
|
+
- name: Install dependencies
|
|
40
|
+
run: |
|
|
41
|
+
python -m pip install --upgrade pip
|
|
42
|
+
pip install pytest
|
|
43
|
+
pip install -r requirements.txt
|
|
44
|
+
pip install -e .
|
|
45
|
+
|
|
46
|
+
- name: Run the tests
|
|
47
|
+
run: pytest tests -m 'not slow'
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: SPONGE TestPyPI installation test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows:
|
|
6
|
+
- SPONGE TestPyPI upload
|
|
7
|
+
types:
|
|
8
|
+
- completed
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test-install:
|
|
12
|
+
name: Test installation of SPONGE from TestPyPI
|
|
13
|
+
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout repository
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: '3.10'
|
|
26
|
+
|
|
27
|
+
- name: Update pip
|
|
28
|
+
run: |
|
|
29
|
+
python -m pip install --upgrade pip
|
|
30
|
+
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: |
|
|
33
|
+
pip install -r requirements.txt
|
|
34
|
+
|
|
35
|
+
- name: Install from TestPyPI
|
|
36
|
+
run: |
|
|
37
|
+
pip install --index-url https://test.pypi.org/simple/ netzoopy-sponge
|
|
38
|
+
|
|
39
|
+
- name: Test basic functionality
|
|
40
|
+
run: |
|
|
41
|
+
netzoopy-sponge --help
|
|
42
|
+
|
|
43
|
+
- name: Save release version
|
|
44
|
+
run: |
|
|
45
|
+
echo ${{ github.event.workflow_run.head_branch }} >> version.txt
|
|
46
|
+
|
|
47
|
+
- name: Upload artifact with the version
|
|
48
|
+
uses: actions/upload-artifact@v4
|
|
49
|
+
with:
|
|
50
|
+
name: version
|
|
51
|
+
path: ./version.txt
|
|
52
|
+
retention-days: 1
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Copyright (C) 2025 Ladislav Hovan <ladislav.hovan@ncmbm.uio.no>
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
4
|
+
#
|
|
5
|
+
# This library is free software: you can redistribute it and/or
|
|
6
|
+
# modify it under the terms of the GNU Public License as published
|
|
7
|
+
# by the Free Software Foundation; either version 3 of the License,
|
|
8
|
+
# or (at your option) any later version.
|
|
9
|
+
#
|
|
10
|
+
# This library is distributed in the hope that it will be useful,
|
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
+
# Library General Public License for more details.
|
|
14
|
+
#
|
|
15
|
+
# You should have received a copy of the GNU Public License along
|
|
16
|
+
# with this library. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
ARG PYTHON_VERSION=3.12
|
|
19
|
+
FROM python:${PYTHON_VERSION}-slim
|
|
20
|
+
|
|
21
|
+
# Keeps Python from buffering stdout and stderr to avoid situations where
|
|
22
|
+
# the application crashes without emitting any logs due to buffering
|
|
23
|
+
ENV PYTHONUNBUFFERED=1
|
|
24
|
+
|
|
25
|
+
# Keeps Python from writing .pyc files
|
|
26
|
+
ENV PYTHONDONTWRITEBYTECODE=1
|
|
27
|
+
|
|
28
|
+
# Create a non-privileged user that the app will run under
|
|
29
|
+
# See https://docs.docker.com/go/dockerfile-user-best-practices/
|
|
30
|
+
ARG UID=10001
|
|
31
|
+
RUN adduser \
|
|
32
|
+
--disabled-password \
|
|
33
|
+
--gecos "" \
|
|
34
|
+
--uid "${UID}" \
|
|
35
|
+
--shell "/bin/bash" \
|
|
36
|
+
appuser
|
|
37
|
+
|
|
38
|
+
# Install SPONGE
|
|
39
|
+
RUN python -m pip install --no-cache-dir netzoopy-sponge
|
|
40
|
+
|
|
41
|
+
# Create the working directory
|
|
42
|
+
WORKDIR /app
|
|
43
|
+
RUN chown appuser /app
|
|
44
|
+
|
|
45
|
+
# Switch to the non-privileged user to run the application
|
|
46
|
+
USER appuser
|
|
47
|
+
|
|
48
|
+
# Create an entry point
|
|
49
|
+
ENTRYPOINT ["netzoopy-sponge"]
|
|
50
|
+
CMD []
|
|
51
|
+
|
|
52
|
+
# Labels
|
|
53
|
+
LABEL org.opencontainers.image.source=https://github.com/kuijjerlab/sponge
|
|
54
|
+
LABEL org.opencontainers.image.description="Container image of SPONGE"
|
|
55
|
+
LABEL org.opencontainers.image.licenses=GPL-3.0-or-later
|