Skip to content

Commit

Permalink
Merged
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornwallner committed Mar 25, 2024
2 parents c81209d + b28d6a9 commit 48fc838
Show file tree
Hide file tree
Showing 13 changed files with 232 additions and 94 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on: [push, pull_request, workflow_dispatch]

env:
MIN_COVERAGE_REQUIRED: 50
MIN_COVERAGE_REQUIRED: 35


jobs:
Expand All @@ -28,21 +28,5 @@ jobs:
bash run_test.sh
- name: Coverage
run: |
coverage report
test $(coverage report | grep TOTAL | awk '{ print $4 }' | tr -d "%") -ge $MIN_COVERAGE_REQUIRED
#test_oldbio:
# if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
# runs-on: ubuntu-latest
# timeout-minutes: 10
# defaults:
# run:
# shell: bash -l {0}
#
# steps:
# - uses: actions/checkout@v3
# - name: Test pipeline output
# run: |
# python -m pip install biopython==1.79
# python -m pip install coverage
# python -m pip install .
# bash ./run_test.sh
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
![CI status](https://github.com/bjornwallner/DockQ/actions/workflows/main.yml/badge.svg)

# DockQ: A Quality Measure for Protein-Protein Docking Models
# DockQ
## A Quality Measure for Protein-Protein Docking Models

## Installation

Expand All @@ -12,7 +13,7 @@ cd DockQ
pip install .
```

## Quick start:
## Quick start

After installing DockQ with `pip`, the `DockQ` binary will be in your path. Just run DockQ with:

Expand Down
45 changes: 34 additions & 11 deletions run_test.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,42 @@
#!/bin/bash
set -euo pipefail

rm -f test .coverage

if command -v coverage &> /dev/null; then
binary="coverage run -a -m DockQ.DockQ"
else
binary="DockQ"
fi

# Test that cython version behaves the same as nocython
coverage run -a -m DockQ.DockQ examples/1A2K_r_l_b.model.pdb examples/1A2K_r_l_b.pdb
coverage run -a src/DockQ/DockQ.py examples/1A2K_r_l_b.model.pdb examples/1A2K_r_l_b.pdb
coverage run -a -m DockQ.DockQ examples/1A2K_r_l_b.model.pdb examples/1A2K_r_l_b.pdb --no_align
coverage run -a src/DockQ/DockQ.py examples/1A2K_r_l_b.model.pdb examples/1A2K_r_l_b.pdb --no_align
$binary examples/1A2K_r_l_b.model.pdb examples/1A2K_r_l_b.pdb > test
diff test testdata/1A2K.dockq
python src/DockQ/DockQ.py examples/1A2K_r_l_b.model.pdb examples/1A2K_r_l_b.pdb > test
diff test testdata/1A2K.dockq
$binary examples/1A2K_r_l_b.model.pdb examples/1A2K_r_l_b.pdb --no_align > test
diff test testdata/1A2K.dockq
python src/DockQ/DockQ.py examples/1A2K_r_l_b.model.pdb examples/1A2K_r_l_b.pdb --no_align > test
diff test testdata/1A2K.dockq

# Multiple interfaces
coverage run -a -m DockQ.DockQ examples/dimer_dimer.model.pdb examples/dimer_dimer.pdb --short
$binary examples/dimer_dimer.model.pdb examples/dimer_dimer.pdb --short > test
diff test testdata/dimer_dimer.dockq

# Test on structures with slightly different sequences
coverage run -a -m DockQ.DockQ examples/model.pdb examples/native.pdb --allowed_mismatches 1
$binary examples/model.pdb examples/native.pdb --allowed_mismatches 1 > test
diff test testdata/model.dockq

# Test various mapping strategies
coverage run -a -m DockQ.DockQ examples/1EXB_r_l_b.model.pdb examples/1EXB_r_l_b.pdb --short --mapping AB*:BA*
coverage run -a -m DockQ.DockQ examples/1EXB_r_l_b.model.pdb examples/1EXB_r_l_b.pdb --short --mapping :ABC
coverage run -a -m DockQ.DockQ examples/1EXB_r_l_b.model.pdb examples/1EXB_r_l_b.pdb --short --mapping ABCDEFGH:BADCFEHG
$binary examples/1EXB_r_l_b.model.pdb examples/1EXB_r_l_b.pdb --short --mapping AB*:BA* > test
diff test testdata/1EXB_AB.BA.dockq
$binary examples/1EXB_r_l_b.model.pdb examples/1EXB_r_l_b.pdb --short --mapping :ABC > test
diff test testdata/1EXB_.ABC.dockq
$binary examples/1EXB_r_l_b.model.pdb examples/1EXB_r_l_b.pdb --short --mapping ABCDEFGH:BADCFEHG > test
diff test testdata/1EXB_ABCDEFGH.BADCFEHG.dockq

# Test that cif parsing behaves same as pdb parsing
coverage run -a -m DockQ.DockQ examples/1EXB_r_l_b.model.pdb examples/1EXB_r_l_b.pdb --mapping DH:AE
coverage run -a -m DockQ.DockQ examples/1EXB_r_l_b.model.pdb examples/1EXB.cif.gz --mapping DH:AE
$binary examples/1EXB_r_l_b.model.pdb examples/1EXB_r_l_b.pdb --mapping DH:AE > test
diff test testdata/1EXB_DH.AE.dockq
$binary examples/1EXB_r_l_b.model.pdb examples/1EXB.cif.gz --mapping DH:AE > test
diff test testdata/1EXB_DH.AE_cif.dockq
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ where=src
console_scripts =
DockQ = DockQ.__main__:main

[coverage:run]
include =
*/DockQ/*

Loading

0 comments on commit 48fc838

Please sign in to comment.