Skip to main content

Compute graph representations of protein binding sites

Project description

Graphsite

Graphsite is a software written in Python that reads a pocket (in .mol2) and compute its graph representation. In each generated graph, each atom represents a node. If the distance between two atoms are less than or equal to a threshold (default is 4.5 Angstrom), an undirected edge is formed between these two atoms. The edge attribute is the number of chemical bond(s) on this edge.

Intallation

pip install graphsite

Usage

Graphsite is invented for applications which are based on graph neural networks (GNNs). However, the scope of this tool is not limited to deep graph learning. It can be used in any application that requires graph representaions of proteins/binding sites.

Basic usage

The main module of Graphsite is a callable class which reads 3 files as input:

from graphsite import Graphsite

graphsite = Graphsite()
node_feature, edge_index, edge_attr = pocket_to_graph(
        # path to the .mol2 file of pocket
        mol_path=mol_path, 

        # path to the .profile file of pocket which
        # contains the sequence entropy node feature
        profile_path=profile_path, 

        # path to the .popsa file of pocket which contains
        # the solvent-accessible surface area node feature
        pop_path=pop_path
    )

The node_feature, edge_index, and edge_attr are numpy arrays. For more information about input paramters and output formats, see help:

A Pytorch example

Below is an example where the output matrices of graphsite are used to create graphs for Pytorch-geometric.

from torch_geometric.data import Data

data = Data(
    x=node_feature,
    edge_index=edge_index,
    edge_attr=edge_attr)
)

For a complete deep learning example, please see Graphsite-classifier, where we build a graph classifier over 14 classes of binding pockets.

Cite our work

Please cite our paper if you find this package useful in your project :)

Currently under peer review

Feedback

If you have any questions or suggestions, please submit an issue or pull request. Anyone is welcome to contribute :)

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

graphsite-0.1.0.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file graphsite-0.1.0.tar.gz.

File metadata

  • Download URL: graphsite-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.6.9

File hashes

Hashes for graphsite-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0818c512b37bf0d5bf33a56a5ad659a54a53c6f7e9fa40b61186b0f1b66b6a66
MD5 dd5d034b649d3971afe50211a80c3fc7
BLAKE2b-256 e826b042f135caa46b90dfeafe30502fae358db13d01c0a084c579d102ae9f02

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