Skip to main content

Protein & Interactomic Graph Construction for Machine Learning

Project description

Docs DOI:10.1101/2020.07.15.204701 Project Status: Active – The project has reached a stable, usable state and is being actively developed. CodeFactor Quality Gate Status Bugs Maintainability Rating Reliability Rating Gitter chat License: MIT Code style: black banner

Documentation | Paper | Tutorials

Protein & Interactomic Graph Library

This package provides functionality for producing geometric representations of protein and RNA structures, and biological interaction networks. We provide compatibility with standard PyData formats, as well as graph objects designed for ease of use with popular deep learning libraries.

What's New?

Example usage

Creating a Protein Graph

Tutorial (Residue-level) | Tutorial - Atomic | Docs

from graphein.protein.config import ProteinGraphConfig
from graphein.protein.graphs import construct_graph

config = ProteinGraphConfig()
g = construct_graph(config=config, pdb_code="3eiy")

Creating a Protein Graph from the AlphaFold Protein Structure Database

Tutorial | Docs

from graphein.protein.config import ProteinGraphConfig
from graphein.protein.graphs import construct_graph
from graphein.protein.utils import download_alphafold_structure

config = ProteinGraphConfig()
fp = download_alphafold_structure("Q5VSL9", aligned_score=False)
g = construct_graph(config=config, pdb_path=fp)

Creating a Protein Mesh

Tutorial | Docs

from graphein.protein.config import ProteinMeshConfig
from graphein.protein.meshes import create_mesh

verts, faces, aux = create_mesh(pdb_code="3eiy", config=config)

Creating an RNA Graph

Tutorial | Docs

from graphein.rna.graphs import construct_rna_graph
# Build the graph from a dotbracket & optional sequence
rna = construct_rna_graph(dotbracket='..(((((..(((...)))..)))))...',
                          sequence='UUGGAGUACACAACCUGUACACUCUUUC')

Creating a Protein-Protein Interaction Graph

Tutorial | Docs

from graphein.ppi.config import PPIGraphConfig
from graphein.ppi.graphs import compute_ppi_graph
from graphein.ppi.edges import add_string_edges, add_biogrid_edges

config = PPIGraphConfig()
protein_list = ["CDC42", "CDK1", "KIF23", "PLK1", "RAC2", "RACGAP1", "RHOA", "RHOB"]

g = compute_ppi_graph(config=config,
                      protein_list=protein_list,
                      edge_construction_funcs=[add_string_edges, add_biogrid_edges]
                     )

Creating a Gene Regulatory Network Graph

Tutorial | Docs

from graphein.grn.config import GRNGraphConfig
from graphein.grn.graphs import compute_grn_graph
from graphein.grn.edges import add_regnetwork_edges, add_trrust_edges

config = GRNGraphConfig()
gene_list = ["AATF", "MYC", "USF1", "SP1", "TP53", "DUSP1"]

g = compute_grn_graph(
    gene_list=gene_list,
    edge_construction_funcs=[
        partial(add_trrust_edges, trrust_filtering_funcs=config.trrust_config.filtering_functions),
        partial(add_regnetwork_edges, regnetwork_filtering_funcs=config.regnetwork_config.filtering_functions),
    ],
)

Installation

The dev environment includes GPU Builds (CUDA 11.1) for each of the deep learning libraries integrated into graphein.

git clone https://www.github.com/a-r-j/graphein
cd graphein
conda create env -f environment-dev.yml
pip install -e .

A lighter install can be performed with:

git clone https://www.github.com/a-r-j/graphein
cd graphein
conda create env -f environment.yml
pip install -e .

Citing Graphein

Please consider citing graphein if it proves useful in your work.

@article{Jamasb2020,
  doi = {10.1101/2020.07.15.204701},
  url = {https://doi.org/10.1101/2020.07.15.204701},
  year = {2020},
  month = jul,
  publisher = {Cold Spring Harbor Laboratory},
  author = {Arian Rokkum Jamasb and Pietro Lio and Tom Blundell},
  title = {Graphein - a Python Library for Geometric Deep Learning and Network Analysis on Protein Structures}
}

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

graphein-1.0.3.tar.gz (99.2 kB view details)

Uploaded Source

Built Distributions

graphein-1.0.3-py3-none-any.whl (104.7 kB view details)

Uploaded Python 3

graphein-1.0.3-py2.py3-none-any.whl (103.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file graphein-1.0.3.tar.gz.

File metadata

  • Download URL: graphein-1.0.3.tar.gz
  • Upload date:
  • Size: 99.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for graphein-1.0.3.tar.gz
Algorithm Hash digest
SHA256 f6acb084af8dd90464698c6c992de4a8254c0ad777b786d164676a0e39af6fca
MD5 4e3c14994eea1d12e623091ed9b52e4e
BLAKE2b-256 c04ddcd09f879f83b6f76e8259529f268b53ba92e30075328b6000d12dc446f0

See more details on using hashes here.

File details

Details for the file graphein-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: graphein-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 104.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.4

File hashes

Hashes for graphein-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8e2a20142ca049715032a75265fbbf63210833aa28eac71be2f5f8b9c0410a16
MD5 98b3f6c0f2fce374f8ceb113d61c102d
BLAKE2b-256 98f85c7e88d681fca9c214bc4e212840e281cf01e11c1b1288abac2600bba83d

See more details on using hashes here.

File details

Details for the file graphein-1.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: graphein-1.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 103.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for graphein-1.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0c6e830901c1704fcdb884833c56cfa4ecc50981b52508e5e4b8fc7d975de44a
MD5 224032ca3fe1c69a2c88cda6aa55e3ef
BLAKE2b-256 1ddacee96b84a42b058926a265f5336fcfd1b0ebb88762df7a2299d52382ce02

See more details on using hashes here.

Supported by

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