Skip to main content

A python wrapper around CNS for modelling and docking using distance predictions, inspired by CONFOLD

Project description

pyconsFold:

A python modelling framework built on top of CNS. Support for both trRosetta distance predictions and CASP format contact predictions, both binary and distance based.

Install

pyconsFold require a working installation of CNS. This needs to be done manually due to license.

  1. Install CNS

    1. Request a download link from CNS.
    2. Follow the emailed instructions to download "cns_solve_1.3_all_intel-mac_linux.tar.gz
    3. Extract the files tar xzvf cns_solve_1.3_all_intel-mac_linux.tar.gz
    4. Change into the resulting directory cd cns_solve_1.3
    5. Unhide the bash-specific file mv .cns_solve_env_sh cns_solve_env.sh
    6. In this resulting file, replace _CNSsolve_location_ with the CNS installation folder. If you extracted the file in your homefolder then the CNS installation would be: /home/<your username>/cns_solve_1.3
    7. Source CNS, source cns_solve_env.sh*, to make this permanent and to prevent you having to do this every time, add it to your .bashrc file.
    8. Test CNS by going into the test folder cd test and run the tests ../bin/run_tests -tidy *.inp * If you get an error about csh interpreter, you need to install csh
  2. Install pyconsFold

    1. Run pip install pyconsFold
  3. Optional: If you clone this github repo, you can run a suite of tests using python3 run_test.py

Usage

import pyconsFold

pyconsFold.model_dist(fasta, contacts, out_dir)

Functions

model      -- Classic modelling using binary contact predictions (although the contact file can contain distance and errors they wont be used)
model_dist -- Model using distance and errors, requires either a CASP-formated rr file with additional column with standard error in Ångströms or a trRosetta-contacts file in npz-format.
model_dock -- Perform modelling and docking of two protein chains. Requires _one_ contacts file with both inter- and intra-contacts.

Top arguments

rr_pthres	--	Threshold for the confidence we want in a prediction (default model(0.80), model_dist(0.45), model_dock(0.50))
rr_sep		--	Separation between contacts (default 0)
save_step	--	Save working steps (default False)
stage2		--	Run stage2, filter contacts vs generated structure and generate new structures with filtered contacts (default False)
debug		--	Write out debug information (default False)
selectrr	--	How many contacts to use? Can be "all", "#L", or #. (default "all")
mcount		--	How many models to generate? (default 20)
top_models	--	How many of the generated models should be ranked and saved? (default 20)
use_angles	--	If predicted angels should be used, only works with npz (default False)
omega		--	RR-formated file with omega angles (if npz are not used) (default '')
theta		--	RR-formated file with theta angles (if npz are not used) (default '')

Utilities

QA-function arguments to all above functions:

  • pcons (default False) -- If set to true, gives pcons score for all models (using either pcons installed in the PATH or the builtin binary)
  • tmscore_pdb_file -- If a structure file is supplied, runs all models against this (presumed) native structure and reports the TMscore (using either TMscore in the PATH or builtin binary)

Extras

from pyconsFold.utils import npz_to_casp, pdb_to_npz

npz_to_casp("trRosetta.npz")  ##  Converts trRosetta distance and angle predictions to CASP format in separate files

pdb_to_npz("structure.pdb")   ##  Converts a structure (pdb/mmCif) to trRosetta distances and angles, useful when investigating how well a model conforms to restraints

Adjustable parameters for CNS, advanced

rrtype		--	Between which atoms in a residue are the contacts? (default 'cb')
lbd			--	Lambda, 0.1-10 (default 0.4)
contwt		--	Contact restraint weights, 0.1-10000 (default 10)
sswt		--	Secondary structure weights, 0.1-100 (default 5)
bin_values	--	Dictionary of bin_values for converstion of npz to RR-format, see source code (default {})



Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyconsFold-0.1.3.tar.gz (28.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyconsFold-0.1.3-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file pyconsFold-0.1.3.tar.gz.

File metadata

  • Download URL: pyconsFold-0.1.3.tar.gz
  • Upload date:
  • Size: 28.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.7

File hashes

Hashes for pyconsFold-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4328bee56f1f2e545aed6101aba5d19d905e42694476e7ceb076558512a71bb3
MD5 3e1826f7e8372ab97232815cc647f8fe
BLAKE2b-256 fa05cb7c40e45b561d86906eac7baecde4231ec0e54d770e4785a1956f2b5a7c

See more details on using hashes here.

File details

Details for the file pyconsFold-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pyconsFold-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.7

File hashes

Hashes for pyconsFold-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d906ef6c8024c9db62ce3b4f2862c02322c8c9858cb0f202dbbc1e9579a3af3c
MD5 5a7043ea8c4bbb43cc05f4e0e0ee8b52
BLAKE2b-256 8d4d508f497f3ae3223b3b7dfaa5313bf483ecd7e97677429d0c360635d7cc7e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page