Skip to content

Commit

Permalink
Tweak repository for publishing (#18)
Browse files Browse the repository at this point in the history
* add proper version to pyproject.toml

* update readme

* add pypi-publish action

* add upper limit to python version
  • Loading branch information
rvhonorato authored Apr 30, 2024
1 parent 3dc6adc commit 8692d45
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 35 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: publish to PyPI

on:
release:
types: [published]

jobs:
pypi_release:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: "3.11"

- uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true

- run: poetry install

- run: poetry run pytest

- run: poetry config pypi-token.pypi "${{ secrets.PYPI_API_KEY }}"

- name: Publish package
run: poetry publish --build
66 changes: 62 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# PRODIGY-cryst

![PyPI - License](https://img.shields.io/pypi/l/prodigy-cryst)
![PyPI - Status](https://img.shields.io/pypi/status/prodigy-cryst)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/prodigy-cryst)
[![ci](https://github.com/haddocking/prodigy-cryst/actions/workflows/ci.yml/badge.svg)](https://github.com/haddocking/prodigy-cryst/actions/workflows/ci.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4f129d451ec04c4e9529a6eb28457619)](https://www.codacy.com/gh/haddocking/prodigy-cryst/dashboard?utm_source=github.com&utm_medium=referral&utm_content=haddocking/prodigy-cryst&utm_campaign=Badge_Grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/4f129d451ec04c4e9529a6eb28457619)](https://www.codacy.com/gh/haddocking/prodigy-cryst/dashboard?utm_source=github.com&utm_medium=referral&utm_content=haddocking/prodigy-cryst&utm_campaign=Badge_Coverage)
Expand All @@ -10,14 +13,69 @@ Collection of scripts to predict whether an interface in a protein-protein compl
## Installation

```bash
> git clone http://github.com/haddocking/prodigy-cryst
> python setup.py install
pip install prodigy-cryst
```

## Usage

Type --help to get a list of all the possible options.

```bash
$ prodigy_cryst --help
usage: prodigy_cryst [-h] [--contact_list] [-q] [--selection A B [A,B C ...]] structf

Biological/crystallographic interface classifier based on Intermolecular Contacts (ICs).

positional arguments:
structf Structure to analyse in PDB or mmCIF format

optional arguments:
-h, --help show this help message and exit
--contact_list Output a list of contacts
-q, --quiet Outputs only the predicted interface class

Selection Options:

By default, all intermolecular contacts are taken into consideration,
a molecule being defined as an isolated group of amino acids sharing
a common chain identifier. In specific cases, for example
antibody-antigen complexes, some chains should be considered as a
single molecule.

Use the --selection option to provide collections of chains that should
be considered for the calculation. Separate by a space the chains that
are to be considered _different_ molecules. Use commas to include multiple
chains as part of a single group:

--selection A B => Contacts calculated (only) between chains A and B.
--selection A,B C => Contacts calculated (only) between chains A and C; and B and C.
--selection A B C => Contacts calculated (only) between chains A and B; B and C; and A and C.


--selection A B [A,B C ...]
```
## Examples
Download PDB file 1ppe from the PDB and run the script on it.
```bash
prodigy_cryst <pdb file> [--selection <chain1><chain2>]
wget https://files.rcsb.org/download/1PPE.pdb
```
Type --help to get a list of all the possible options.
Check how PRODIGY-cryst works on the 1PPE.pdb file. The script will output the number of intermolecular contacts, the number of contacts of each type, the link density, and the predicted interface class.
```bash
$ prodigy_cryst 1PPE.pdb
[+] Reading structure file: /home/rodrigo/1PPE.pdb
[+] Selection: E, I
[+] No. of intermolecular contacts: 71
[+] No. of charged-charged contacts: 4
[+] No. of charged-polar contacts: 8
[+] No. of charged-apolar contacts: 24
[+] No. of polar-polar contacts: 0
[+] No. of apolar-polar contacts: 15
[+] No. of apolar-apolar contacts: 20
[+] Link density: 0.14
[+] Class: BIO 0.804 0.196
```
58 changes: 29 additions & 29 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "prodigy-cryst"
version = "1.0.1"
version = "1.0.0"
description = "Predicts if a protein complex interface is biological or crystallographic."
authors = ["BonvinLab <[email protected]>"]
readme = "README.md"
Expand All @@ -15,7 +15,7 @@ classifiers = [
]

[tool.poetry.dependencies]
python = "^3.8"
python = ">=3.8,<3.9"
scikit-learn = "0.22"
biopython = "^1.79"
numpy = "~1.20"
Expand Down

0 comments on commit 8692d45

Please sign in to comment.