Skip to content

Commit

Permalink
Merge pull request #64 from valentynbez/main
Browse files Browse the repository at this point in the history
Add PDB search
  • Loading branch information
valentynbez authored Jan 3, 2024
2 parents fe554d3 + 8593b93 commit 67cd908
Show file tree
Hide file tree
Showing 15 changed files with 761 additions and 297 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/autoyapf.yml

This file was deleted.

246 changes: 246 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
name: Package

on:
push:
tags:
- v*

jobs:

wheel-linux-aarch64:
name: Build Linux wheels (Aarch64)
runs-on: ubuntu-20.04
strategy:
matrix:
python-tag:
- cp36-manylinux_aarch64
- cp37-manylinux_aarch64
- cp38-manylinux_aarch64
- cp39-manylinux_aarch64
- cp310-manylinux_aarch64
- cp311-manylinux_aarch64
- cp312-manylinux_aarch64
- pp37-manylinux_aarch64
- pp38-manylinux_aarch64
- pp39-manylinux_aarch64
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Build manylinux wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: aarch64
CIBW_BUILD: ${{ matrix.python-tag }}
CIBW_BEFORE_BUILD: pip install cython
CIBW_BUILD_VERBOSITY: 2
CIBW_TEST_REQUIRES: importlib-resources
with:
output-dir: dist
- uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*

wheel-linux-x86_64:
name: Build Linux wheels (x86-64)
runs-on: ubuntu-20.04
strategy:
matrix:
python-tag:
- cp36-manylinux_x86_64
- cp37-manylinux_x86_64
- cp38-manylinux_x86_64
- cp39-manylinux_x86_64
- cp310-manylinux_x86_64
- cp311-manylinux_x86_64
- cp312-manylinux_x86_64
- pp37-manylinux_x86_64
- pp38-manylinux_x86_64
- pp39-manylinux_x86_64
steps:
- uses: actions/checkout@v4
- name: Build manylinux wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: x86_64
CIBW_BUILD: ${{ matrix.python-tag }}
CIBW_BEFORE_BUILD: pip install cython
CIBW_BUILD_VERBOSITY: 2
CIBW_TEST_REQUIRES: importlib-resources
with:
output-dir: dist
- uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*

wheel-macos-x86_64:
name: Build MacOS wheels (x86-64)
runs-on: macOS-11
strategy:
matrix:
python-tag:
- cp36-macosx_x86_64
- cp37-macosx_x86_64
- cp38-macosx_x86_64
- cp39-macosx_x86_64
- cp310-macosx_x86_64
- cp311-macosx_x86_64
- cp312-macosx_x86_64
- pp37-macosx_x86_64
- pp38-macosx_x86_64
- pp39-macosx_x86_64
steps:
- uses: actions/checkout@v4
- name: Build manylinux wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: x86_64
CIBW_BUILD: ${{ matrix.python-tag }}
CIBW_BEFORE_BUILD: pip install cython
CIBW_BUILD_VERBOSITY: 2
CIBW_TEST_REQUIRES: importlib-resources
with:
output-dir: dist
- uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*

wheel-macos-aarch64:
name: Build MacOS wheels (Aarch64)
runs-on: macOS-11
strategy:
matrix:
python-tag:
- cp38-macosx_arm64
- cp39-macosx_arm64
- cp310-macosx_arm64
- cp311-macosx_arm64
- cp312-macosx_arm64
steps:
- uses: actions/checkout@v4
- name: Build manylinux wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: arm64
CIBW_BUILD: ${{ matrix.python-tag }}
CIBW_BEFORE_BUILD: pip install cython
CIBW_BUILD_VERBOSITY: 2
CIBW_TEST_REQUIRES: importlib-resources
with:
output-dir: dist
- uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*

wheel-win32-x86_64:
name: Build Windows wheels (x86-64)
runs-on: windows-2019
strategy:
matrix:
python-tag:
- cp36-win_amd64
- cp37-win_amd64
- cp38-win_amd64
- cp39-win_amd64
- cp310-win_amd64
- cp311-win_amd64
- cp312-win_amd64
- pp37-win_amd64
- pp38-win_amd64
- pp39-win_amd64
steps:
- uses: actions/checkout@v4
- name: Build manylinux wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: AMD64
CIBW_BUILD: ${{ matrix.python-tag }}
CIBW_BEFORE_BUILD: pip install cython
CIBW_BUILD_VERBOSITY: 2
CIBW_TEST_REQUIRES: importlib-resources
with:
output-dir: dist
- uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*

sdist:
runs-on: ubuntu-latest
name: Build source distribution
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install build requirements
run: python -m pip install -r .github/workflows/requirements.txt
- name: Build source distribution
run: python setup.py sdist
- name: Store built source distribution
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist/*

test-sdist:
runs-on: ubuntu-latest
name: Test source distribution
needs:
- sdist
steps:
- name: Setup Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Download built wheels
uses: actions/download-artifact@v2
with:
name: wheels
path: dist/
- name: Update pip to latest version
run: python -m pip install -U pip setuptools wheel
- name: Install built wheel
run: python -m pip install --no-binary mDeepFRI --find-links=dist mDeepFRI

upload:
environment: PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
name: Upload
needs:
- sdist
- test-sdist
- wheel-linux-aarch64
- wheel-linux-x86_64
- wheel-macos-aarch64
- wheel-macos-x86_64
- wheel-win32-x86_64
steps:
- uses: actions/download-artifact@v2
with:
name: wheels
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags')

release:
environment: GitHub Releases
runs-on: ubuntu-latest
if: "!contains(github.ref, 'rc')"
name: Release
needs: upload
steps:
- uses: actions/checkout@v4
- uses: rasmus-saks/[email protected]
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Metagenomic-DeepFRI addresses such need, building upon efficient libraries. It i

### 📋 Pipeline stages

1. Search proteins similar to query in a FoldComp database with MMSeqs2.
2. Find the best alignment among MMSeqs2 hits using PyOpal.
1. Search proteins similar to query in PDB and supplied `FoldComp` databases with `MMSeqs2`.
2. Find the best alignment among `MMSeqs2` hits using `PyOpal`.
3. Align target protein contact map to query protein with unknown structure.
4. Run DeepFRI with structure if it was found in database, otherwise run DeepFRI with sequence only.
4. Run `DeepFRI` with structure if it was found in database, otherwise run `DeepFRI` with sequence only.

### 🛠️ Built With

Expand Down Expand Up @@ -40,7 +40,7 @@ pip install .

## 💡 Usage
### 1. Prepare structural database
Download the database from the [website](https://foldcomp.steineggerlab.workers.dev/). The app was tested with `afdb_swissprot_v4`. You can use different databases, but be mindful that computation time might increase exponentially with the size of the database and the format of protein names might differ and the app will crash.
The PDB database will be automatically downloaded and installed during first run of `mDeepFRI`. You can download additional databases from [website](https://foldcomp.steineggerlab.workers.dev/). The app was tested with `afdb_swissprot_v4`. You can use different databases, but be mindful that computation time might increase exponentially with the size of the database.
### 2. Download models
Two versions of models available:
- `v1.0` - is the original version from DeepFRI publication.
Expand Down Expand Up @@ -99,7 +99,7 @@ mDeepFRI predict-function -i /path/to/protein/sequences -d /path/to/foldcomp/dat
```

### 2. Hierarchical database search
Different databases have a different level of evidence. For example, PDB structures are real experimental structures, and AlphaFold predictions are more accurate than ESMFold predictions. We provide an opporunity to search multiple databases in a hierarchical manner. For example, if you want to search AlphaFold database first, and then ESMFold, you can pass the parameter `-d` or `--databases` few times, i.e.:
Different databases have a different level of evidence. For example, PDB structures are real experimental structures, thus they are considered to be the data of highest quality. Therefore new proteins are first queried against PDB. Computational predictions differ by quality, i.e. AlphaFold predictions are often more accurate than ESMFold predictions. We provide an opporunity to search multiple databases in a hierarchical manner. For example, if you want to search AlphaFold database first, and then ESMFold, you can pass the parameter `-d` or `--databases` few times, i.e.:
```
mDeepFRI predict-function -i /path/to/protein/sequences -d /path/to/alphafold/database/ -d /path/to/another/esmcomp/database/ -w /path/to/deepfri/weights/folder -o /output_path
```
Expand Down
Loading

0 comments on commit 67cd908

Please sign in to comment.