Skip to content

Commit

Permalink
Merge branch 'main' into resclust-ouput2
Browse files Browse the repository at this point in the history
  • Loading branch information
VGPReys authored Aug 6, 2024
2 parents 93fa9e1 + 26cd58e commit 19243f7
Show file tree
Hide file tree
Showing 49 changed files with 46,541 additions and 1,114 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
interval: "monthly"
16 changes: 10 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ jobs:

- run: poetry install --no-interaction --no-root

- uses: trunk-io/trunk-action@v1
with:
check-mode: all
- name: Check types
run: poetry run mypy src/ --ignore-missing-imports --explicit-package-bases --disallow-incomplete-defs # --check-untyped-defs

- name: Run sanity check on the API endpoints
run: poetry run pytest -m sanity -vvv

- name: Run unit tests
run: poetry run pytest -m "not (sanity or integration)" --cov=./ --cov-report=xml -v

- name: Test
run: |
poetry run pytest --cov=./ --cov-report=xml -v
- name: Run integration tests
run: poetry run pytest -m integration

- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: build and publish image

on:
push:
# run only against tags
tags:
- "*"

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write

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

# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
30 changes: 30 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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
2 changes: 2 additions & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
*logs
*actions
*notifications
*tools
plugins
user_trunk.yaml
user.yaml
tmp
4 changes: 4 additions & 0 deletions .trunk/configs/.hadolint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Following source doesn't work in most setups
ignored:
- SC1090
- SC1091
2 changes: 2 additions & 0 deletions .trunk/configs/.isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
profile=black
12 changes: 2 additions & 10 deletions .trunk/configs/.markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
# Autoformatter friendly markdownlint config (all formatting rules disabled)
default: true
blank_lines: false
bullet: false
html: false
indentation: false
line_length: false
spaces: false
url: false
whitespace: false
# Prettier friendly markdownlint config (all formatting rules disabled)
extends: markdownlint/style/prettier
7 changes: 7 additions & 0 deletions .trunk/configs/.yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
rules:
quoted-strings:
required: only-when-needed
extra-allowed: ["{|}"]
key-duplicates: {}
octal-values:
forbid-implicit-octal: true
5 changes: 5 additions & 0 deletions .trunk/configs/ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Generic, formatter-friendly config.
select = ["B", "D3", "E", "F"]

# Never enforce `E501` (line length violations). This should be handled by formatters.
ignore = ["E501"]
47 changes: 29 additions & 18 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,42 @@
# This file controls the behavior of Trunk: https://docs.trunk.io/cli
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
version: 0.1
cli:
version: 1.4.1
version: 1.21.0
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
plugins:
sources:
- id: trunk
ref: v0.0.9
ref: v1.4.5
uri: https://github.com/trunk-io/plugins
lint:
enabled:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- git-diff-check
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
disabled:
- isort
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
runtimes:
enabled:
- go@1.18.3
- go@1.21.0
- [email protected]
- [email protected]
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
lint:
enabled:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- git-diff-check
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
actions:
enabled:
- trunk-announce
Expand Down
29 changes: 29 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# YAML 1.2
# Metadata for citation of this software according to the CFF format (https://citation-file-format.github.io/)
cff-version: 1.0.3
message: If you use this software, please cite it using these metadata.
# FIXME title as repository name might not be the best name, please make human readable
title: 'haddocking/arctic3d: v0.5.1'
doi: 10.5281/zenodo.10839520
# FIXME splitting of full names is error prone, please check if given/family name are correct
authors:
- given-names: Marco
family-names: Giulini
affiliation: Utrecht University
- given-names: Rodrigo
family-names: Honorato
name-particle: Vargas
affiliation: '@UtrechtUniversity'
- given-names: Aldo
family-names: van den Nieuwendijk
affiliation:
- given-names: Alexandre
family-names: Bonvin
affiliation: '@UtrechtUniversity'
- given-names: Anton
family-names: Bushuiev
affiliation: Czech Technical University in Prague
version: 0.5.1
date-released: 2024-03-19
repository-code: https://github.com/haddocking/arctic3d
license: cc-by-4.0
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Developing ARCTIC-3D

This section is still work in progress

## Installation

We use `poetry` to manage the dependencies and the virtual environment, so it makes things easier if you need to install it first; check the [official documentation](https://python-poetry.org/docs/#installation) for more details.
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM python:3.10
WORKDIR /opt/software
COPY . .
RUN pip install .
WORKDIR /data
ENTRYPOINT [ "arctic3d" ]
37 changes: 34 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
# ARCTIC-3D

![PyPI - License](https://img.shields.io/pypi/l/arctic3d)
![PyPI - Status](https://img.shields.io/pypi/status/arctic3d)
![PyPI - Version](https://img.shields.io/pypi/v/arctic3d)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/arctic3d)

[![ci](https://github.com/haddocking/arctic3d/actions/workflows/ci.yml/badge.svg)](https://github.com/haddocking/arctic3d/actions/workflows/ci.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/dc788367452c47928e30f2f1f481d7e4)](https://www.codacy.com/gh/haddocking/arctic3d/dashboard?utm_source=github.com&utm_medium=referral&utm_content=haddocking/arctic3d&utm_campaign=Badge_Coverage)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/dc788367452c47928e30f2f1f481d7e4)](https://www.codacy.com/gh/haddocking/arctic3d/dashboard?utm_source=github.com&utm_medium=referral&utm_content=haddocking/arctic3d&utm_campaign=Badge_Grade)

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10839520.svg)](https://doi.org/10.5281/zenodo.10839520)
[![SQAaaS badge shields.io](https://img.shields.io/badge/sqaaas%20software-bronze-e6ae77)](https://api.eu.badgr.io/public/assertions/oAuS52pQTWaC90qMk97hlA "SQAaaS bronze badge achieved")
[![fair-software.eu](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8B%20%20%E2%97%8B%20%20%E2%97%8F-orange)](https://fair-software.eu)
[![fair-software.eu](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F-green)](https://fair-software.eu)


[![SQAaaS badge](https://github.com/EOSC-synergy/SQAaaS/raw/master/badges/badges_150x116/badge_software_bronze.png)](https://api.eu.badgr.io/public/assertions/oAuS52pQTWaC90qMk97hlA "SQAaaS bronze badge achieved")

<img src="docs/imgs/arctic3d.png" width="450">
<img src="https://raw.githubusercontent.com/haddocking/arctic3d/main/docs/imgs/arctic3d.png" width="450">

**A**utomatic **R**etrieval and **C**lus**T**ering of **I**nterfaces in Complexes from **3D** structural information

## WEB SERVER

ARCTIC-3D is available at this webserver https://wenmr.science.uu.nl/arctic3d/

## ARCTIC-3D: all you want to know about protein-specific interfaces

ARCTIC-3D is a software for data-mining and clustering of protein interface information. It allows you to retrieve all the existing interface information for your desired protein from the PDBE graph database (https://www.ebi.ac.uk/pdbe/pdbe-kb/), grouping similar interfaces in interacting surfaces.
Expand All @@ -28,6 +40,15 @@ Check [CONTRIBUTING.md](CONTRIBUTING.md) for more information.

### With `conda`

Clone the repository on your computer and navigate to it

```bash
git clone [email protected]:haddocking/arctic3d.git
cd arctic3d
```

Here you can create the arctic3d environment:

```bash
conda create -n arctic3d python=3.10
conda activate arctic3d
Expand All @@ -41,7 +62,11 @@ arctic3d -h
bash install_blast_deps.sh
```

And put `blastp` in your `$PATH`.
And put `blastp` in your `$PATH` by adding the following line to your `.bashrc` or `.bash_profile` file:

```bash
export PATH="PATH_TO_YOUR_ARCTIC3D_INSTALLATION/src/ncbi-blast-2.15.0+/bin:$PATH"
```

## Example usage

Expand All @@ -59,3 +84,9 @@ sphinx-build -E docs ./arctic3d-docs
```

Then you can open the file `arctic3d-docs/index.html`, which contains all the necessary documentation.

## Citing us

If you used ARCTIC-3D in your work please cite the following publication:

**Marco Giulini, Rodrigo V. Honorato, Jesús L. Rivera, and Alexandre MJJ Bonvin**: "ARCTIC-3D: automatic retrieval and clustering of interfaces in complexes from 3D structural information." Communications Biology 7, no. 1 (2024): 49. (www.nature.com/articles/s42003-023-05718-w)
23 changes: 17 additions & 6 deletions install_blast_deps.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
#!/bin/bash
CWD="$(pwd)"
echo "Current working directory: ${CWD}"
DB_DIR=${CWD}/db
# if DB_DIR does not exist, create it
if [ ! -d "$DB_DIR" ]; then
mkdir -p "$DB_DIR"
fi
SRC_DIR=${CWD}/src
OS=$(uname -s)

echo "Operating System: ${OS}"
echo "Downloading BLAST+ executables and swissprot database..."

#======================================================================#
echo "Downloading BLAST+..."
cd "${SRC_DIR}" || exit

if [ "${OS}" == "Darwin" ]; then
# if the OS is Darwin or Mac OS X, download the Mac OS X version of BLAST+
# if the OS is Linux, download the Linux version of BLAST+
if [ "${OS}" == "Darwin" ] || [ "${OS}" == "Mac OS X" ]; then
# Do something under Mac OS X platform
BLAST_URL="https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ncbi-blast-2.13.0+-x64-macosx.tar.gz"
echo "Downloading BLAST+ for Mac OS X..."
BLAST_URL="https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.15.0/ncbi-blast-2.15.0+-x64-macosx.tar.gz"
elif [ "${OS}" == "Linux" ]; then
# Do something under GNU/Linux platform
BLAST_URL="https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ncbi-blast-2.13.0+-x64-linux.tar.gz"
echo "Downloading BLAST+ for Linux..."
BLAST_URL="https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.15.0/ncbi-blast-2.15.0+-x64-linux.tar.gz"
fi

echo "Downloading BLAST+ from ${BLAST_URL}..."
wget "$BLAST_URL" >/dev/null 2>&1
echo "BLAST downloaded in ${SRC_DIR}"

tar -xzf ncbi-blast-2.13.0+-x64-*.tar.gz
rm ncbi-blast-2.13.0+-x64-*.tar.gz
tar -xzf ncbi-blast-2.15.0+-x64-*.tar.gz
rm ncbi-blast-2.15.0+-x64-*.tar.gz
#======================================================================#
echo "Downloading SwissProt DB..."
cd "$DB_DIR" || exit
Expand Down
Loading

0 comments on commit 19243f7

Please sign in to comment.