Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions .github/workflows/autorun-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,24 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10

- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.10"
python-version: "3.11"

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test,dev]"
uv sync --extra test --extra dev

- name: Lint and format with ruff
run: |
ruff check . --statistics
ruff format .
uv run ruff check . --statistics
uv run ruff format .

- name: Test with pytest
run: |
pytest --cov=dscript --cov-report=xml --cov-report=term-missing
uv run pytest --cov=dscript --cov-report=xml --cov-report=term-missing
12 changes: 6 additions & 6 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ permissions:
jobs:
docs-build:
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[docs]"

- name: Build documentation
working-directory: docs
run: |
# Build HTML documentation with warnings treated as errors
sphinx-build -W -b html source build/html

- name: Check for build artifacts
run: |
# Verify that the documentation was built successfully
Expand All @@ -43,7 +43,7 @@ jobs:
exit 1
fi
echo "Documentation build completed successfully"

- name: Upload documentation artifacts
uses: actions/upload-artifact@v4
if: always()
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dev*
# Files
collect_env.py
RUN_DSCRIPT.sh
.coverage

# File Types
**/*.egg-info
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- Improve method for loading embeddings
- Modernized D-SCRIPT repository
- Significantly updated unittest coverage
- Migrate to loguru under the hood
- Migrate to loguru under the hood
- Update pyproject, GitHub actions, and other continuous integration/installation
- Linting and formatting with Ruff

Expand All @@ -27,7 +27,7 @@
- Update pretrained API and docs to include Topsy-Turvy
- Add retry decorator to get_pretrained if download fails
- Add ability to set a random seed for training
- Update `evaluate` code to also store metrics in a file
- Update `evaluate` code to also store metrics in a file

### v0.2.1: 2022-06-28 -- Bug fixes
- Add biopython to setup.py
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ For inference, proteins can be divided into blocks to reduce memory usage for em
```bash
#Example with 16 blocks, using (using 3/16th the maximum embedding memory), and a GPU
dscript predict --pairs data/pairs/ecoli_test.tsv --embeddings ecoli_embed.h5 --outfile ecoli_test_predict --blocks 16 -d 0
```
```

For more information on prediction modes, such as all-pair and bipartite predictions, see our [complete documentation](https://d-script.readthedocs.io/en/main/usage.html)

## References
- The original D-SCRIPT model is described in the paper “[D-SCRIPT translates genome to phenome with sequence-based, structure-aware, genome-scale predictions of protein-protein interactions](https://doi.org/10.1016/j.cels.2021.08.010).”
- We have updated D-SCRIPT to incorporate network information ([Topsy Turvy](https://academic.oup.com/bioinformatics/article/38/Supplement_1/i264/6617505)) and structure information ([TT3D](https://academic.oup.com/bioinformatics/article/39/11/btad663/7332153))
- The addition of Blocked, Multi-GPU Parallel Inference to D-SCRIPT is described in the application note “[Memory-Efficient, Accelerated Protein Interaction inference with Blocked, Multi-GPU D-SCRIPT](https://doi.org/10.1093/bioinformatics/btaf564).”
- The addition of Blocked, Multi-GPU Parallel Inference to D-SCRIPT is described in the application note “[Memory-Efficient, Accelerated Protein Interaction inference with Blocked, Multi-GPU D-SCRIPT](https://doi.org/10.1093/bioinformatics/btaf564).”
- [Documentation](https://d-script.readthedocs.io/en/main/)
58 changes: 58 additions & 0 deletions coverage.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
============================= test session starts ==============================
platform linux -- Python 3.12.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /mnt/home/ssledzieski/GitHub/D-SCRIPT
configfile: pyproject.toml
testpaths: dscript/tests
plugins: anyio-4.12.0, cov-7.0.0
collected 309 items / 2 deselected / 307 selected

dscript/tests/test_alphabets.py ........................ [ 7%]
dscript/tests/test_commands.py .......... [ 11%]
dscript/tests/test_extract_3di.py ............ [ 14%]
dscript/tests/test_fasta.py ......... [ 17%]
dscript/tests/test_foldseek.py ............. [ 22%]
dscript/tests/test_glider.py ........................................... [ 36%]
....... [ 38%]
dscript/tests/test_language_model.py ......... [ 41%]
dscript/tests/test_load_worker.py ............. [ 45%]
dscript/tests/test_main.py ......................... [ 53%]
dscript/tests/test_models_contact.py ................. [ 59%]
dscript/tests/test_models_embedding.py ........................... [ 68%]
dscript/tests/test_models_interaction.py ............................ [ 77%]
dscript/tests/test_par_writer.py ................ [ 82%]
dscript/tests/test_pretrained.py .................... [ 88%]
dscript/tests/test_utils.py .................................. [100%]

================================ tests coverage ================================
_______________ coverage: platform linux, python 3.12.11-final-0 _______________

Name Stmts Miss Cover Missing
---------------------------------------------------------------------
dscript/__init__.py 5 0 100%
dscript/__main__.py 35 1 97% 87
dscript/alphabets.py 49 0 100%
dscript/commands/__init__.py 1 0 100%
dscript/commands/embed.py 32 13 59% 47-59, 63-65
dscript/commands/evaluate.py 169 128 24% 112-154, 161-170, 180-291, 295-297
dscript/commands/extract_3di.py 33 4 88% 55-58
dscript/commands/par_worker.py 64 57 11% 22-121
dscript/commands/par_writer.py 31 0 100%
dscript/commands/predict_bipartite.py 199 143 28% 137-152, 155-159, 162-171, 174-176, 181-208, 220-418, 422-424
dscript/commands/predict_block.py 289 243 16% 127-561, 565-567
dscript/commands/predict_serial.py 176 136 23% 97-295, 299-301
dscript/commands/train.py 358 264 26% 265-301, 331-342, 394-454, 484-532, 537-831, 841-869, 873-875
dscript/fasta.py 44 6 86% 61-66
dscript/foldseek.py 35 1 97% 70
dscript/glider.py 185 3 98% 106-108
dscript/language_model.py 73 15 79% 31, 39, 61-63, 74, 85, 108-109, 129-134
dscript/load_worker.py 14 0 100%
dscript/loading.py 69 58 16% 15-34, 38-59, 63-85, 88-92
dscript/models/__init__.py 1 0 100%
dscript/models/contact.py 44 0 100%
dscript/models/embedding.py 76 2 97% 143-144
dscript/models/interaction.py 94 5 95% 201-206, 229
dscript/pretrained.py 88 1 99% 109
dscript/utils.py 66 0 100%
---------------------------------------------------------------------
TOTAL 2230 1080 52%
================= 307 passed, 2 deselected in 94.25s (0:01:34) =================
Loading