Skip to main content

ProBound model manipulation and scoring interface

Project description

pyProBound

Python package for scoring sequences by a ProBound model

This is an interface package to score sequences by models of transcription factor affinity produced by ProBound (Rube, H.T., Rastogi, C., Feng, S. et al. Prediction of protein–ligand binding affinity from sequencing data with interpretable machine learning. Nat Biotechnol 40, 1520–1527 (2022). https://doi.org/10.1038/s41587-022-01307-0).

This is only an interface. The functional part of the scoring is provided by a (sligthly modified) ProBoundTools Java program available from https://github.com/Caeph/ProBoundTools.git. The original program can be found at https://github.com/BussemakerLab/ProBoundTools.

Requirements

Python>=3.9 with numpy, jpype 1.4.0 and pandas. Installed Java in your path.

Usage

Package contains two classes: MotifCentral: a class representing already available models from https://motifcentral.org/. You can get the fit_id of a model you need, using filters as a taxon, source study or a transcription molecule.

It is currently based on v1.0.0 of the database.

The command

from pyProBound import MotifCentral

database = MotifCentral()
database.filter(taxa=["Drosophila melanogaster"], 
                publications=["Isakova2017", "Jolma2013"])

returns a Pandas DataFrame containing rows that comply with filters.

ProBoundModel: a class representing a binding model.

You can get a model from the MotifCentral database, if you know its fit ID.

from pyProBound import ProBoundModel
model = ProBoundModel(1000, motifcentral=True) 

You can use the ProBound webserver (http://pbdemo.x3dna.org) and fit your own model. You can then load it from the model json.

model = ProBoundModel("fit.sox2.json", fitjson=True)

where "fit.sox2.json" is a path to the file.

Finally, you can load a prepared model from json.

model = ProBoundModel("model.json")

where "model.json" is a path to the file.

Using the loaded model, you can manipulate it (selecting and removing binding modes, ...). You can also score sequences by the following methods:

model.score_affinity_sum(sequences)
model.score_binding_mode_scores(seqs, score_format=...)

See the example jupyter notebooks in the github repository for more details.

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

pyprobound-0.0.10.tar.gz (7.0 MB view details)

Uploaded Source

Built Distribution

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

pyprobound-0.0.10-py3-none-any.whl (7.0 MB view details)

Uploaded Python 3

File details

Details for the file pyprobound-0.0.10.tar.gz.

File metadata

  • Download URL: pyprobound-0.0.10.tar.gz
  • Upload date:
  • Size: 7.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for pyprobound-0.0.10.tar.gz
Algorithm Hash digest
SHA256 0e0c8d3bf079a639eb8871e321e6d7aa9b92ea0bd461a645cc1414461f51d4ec
MD5 784af2d4a41bb31691e1af89c1202b35
BLAKE2b-256 48a4f854b66abc74db4a9334ae5d92d1287d7d5b07baf4b6cfdf24614d3c2d7d

See more details on using hashes here.

File details

Details for the file pyprobound-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: pyprobound-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for pyprobound-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 2a7567d68db4b0a91e1c907f943826a8f1aa5cf122ae6de50c3a0fc690cd878d
MD5 a7d237913783dbdba63e5bfa23861e15
BLAKE2b-256 822e3e7cced61236f28494908be68dc26f0a1754de39cb4f4a1cdbd148bb9343

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