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.
Create your own virtual environment (optional, but recommended):
python3 -m venv venv
. venv/bin/activate
Install the requirements:
pip install .
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
./scripts/cathsm-api \
--in example_data/test.fasta \
--outdir results/ \
--api1_user <your_api_username>
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
./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..."
}
The repo has the following layout:
scripts/
-- command line scriptscathsm/
-- python librariesexample_data/
-- example datatests/
-- tests