Skip to content

Software to run protein structure modelling pipeline (CATH/SWISS-MODEL)

Notifications You must be signed in to change notification settings

CATH-SWISSMODEL/cathsm-client

Repository files navigation

CATH-SM Client

Build Status codecov

This repository contains scripts and libraries to simplify interaction with the CATH / SWISS-MODEL (CATH-SM) protein modelling pipeline.

By default, this interacts with the public API of a running version of cathsm-server in addition to the public API of SWISS-MODEL. However the command line options allow a locally running version of these backend servers to be tested as well.

Note: both of these backend APIs require valid authentication details to submit jobs (ie username / password). Login accounts are freely available and need to be obtained from the resources before running this client.

Setup

Create your own virtual environment (optional, but recommended):

python3 -m venv venv
. venv/bin/activate

Install the requirements:

pip install .

Usage

The following examples assume that you moved to the root directory of this repository and activated the virtual environment (see above).

cd /path/to/cathsm-client
. venv/bin/activate

General usage:

$ ./scripts/cathsm-api
usage: cathsm-api [-h] --in INFILE --outdir OUTDIR --api1_user API1_USER
                  [--api2_user API2_USER] [--max_workers MAX_WORKERS]
                  [--api1_base API1_BASE] [--api2_base API2_BASE]
                  [--startseq STARTSEQ] [--delete-invalid-token]
cathsm-api: error: the following arguments are required: --in/-i, --outdir/-o, --api1_user/-u

Examples

Run a query sequence through the full 3D modelling pipeline

./scripts/cathsm-api \
  --in example_data/test.fasta \
  --outdir results/ \
  --api1_user <your_api_username>

Advanced Usage

Testing against a development version of the backend servers

If you are testing a development version of cathsm-server, override the --api1_base parameter to point to the base URL of your server instance, eg

./scripts/cathsm-api \
  --in example_data/test.fasta \
  --outdir results/ \
  --api1_user <your_api_username> \
  --api_base=http://localhost:3000

API2: Build a 3D model from template alignment data with the SWISS-MODEL API

./scripts/api2.py --in example_data/A0PJE2__35-316.json --out tmp.pdb

input (ie example_data/A0PJE2__35-316.json):

{
    "auth_asym_id": "A",
    "pdb_id": "3rd5",
    "target_sequence": "---------E--VQIPGRVFLVTGGNSGI...",
    "template_seqres_offset": 0,
    "template_sequence": "GSMTGWTAADLP-SFAQRTVVITGANSGL..."
}

Development

The repo has the following layout:

  • scripts/ -- command line scripts
  • cathsm/ -- python libraries
  • example_data/ -- example data
  • tests/ -- tests

About

Software to run protein structure modelling pipeline (CATH/SWISS-MODEL)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages