Coder Social home page Coder Social logo

pegerto / graphpro Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 1.79 MB

GraphPro is a versatile and pluggable OO python library designed for leveraging deep graph learning representations to gain insights into structural proteins and their conformations

Home Page: https://graphpro.readthedocs.io/en/latest/

License: GNU General Public License v3.0

Python 100.00%
deep-learning graph-convolutional-networks network-embedding

graphpro's People

Contributors

pegerto avatar pegerto-ck avatar

Watchers

 avatar  avatar

graphpro's Issues

Transform to Data without NetworkX

This implementation requires networkx to transform a graph to a Data() object, remove this requirement to avoid the extra level of indirection.

Allow graph collection to behave as Dataset

We can create a specific IMemoryDataset

from torch_geometric.data import InMemoryDataset
from typing import Callable, Optional


class Dataset(InMemoryDataset):
    def __init__(
        self,
        root: str,
        collection: GraphCollection,
        transform: Optional[Callable] = None,
        pre_transform: Optional[Callable] = None,
        pre_filter: Optional[Callable] = None,
    ):
        super().__init__(root, transform, pre_transform, pre_filter)
        self.data, self.slices = self.collate([g.to_data() for g in collection])


Allow to define a target in a dataset

Given a collection of graphs, that can be exposed to a dataset:

dataset = col.to_dataset('.', node_encoders=[ResidueType()])

Node encoders provide a set of annotation encoders that transform node properties into an X tensor, additionally, we need a property target=Target, where Target can be a node target or a edge target ( link prediction )

When a NodeTarget it performs an encoding of a specific node property into a tensor.

Create basic .readthedoc configuration

As part of the documentation push, we need to have a read the doc site that contains a basic skelethon

Tasks:

  • Create a basic read the doc site
  • Basic layout
  • Documentation to build [green]

make actions available to PRs

To enable branch projection, we expect actions to validate the PR.

  • Run unitest
  • Run lint verification.

Configure PR branch protection to verify this test.

Document a get starting page

include a getstarting page in the document

Step/Step representation of graph generation using a basic ContactMap, use demo notebook as example.

graph generation file for formats without occupancy information

Using main branch:

when a trajectory file do not contain occupancy,
and a developer try to generate graph
then graph generation file due expected occupancy information.

src/graphpro/graphgen.py:32: in generate
    G = rep.generate(self.ag, self.name)
src/graphpro/graphgen.py:20: in generate
    ca_position = ag.c_alphas_positions(self.chain)
src/graphpro/model.py:39: in c_alphas_positions
    return self._c_alphas(chain).positions
src/graphpro/model.py:29: in _c_alphas
    atoms_filtered = [ag[ag.occupancies.tolist().index(
src/graphpro/model.py:29: in <listcomp>
    atoms_filtered = [ag[ag.occupancies.tolist().index(
../ml/lib/python3.10/site-packages/MDAnalysis/core/groups.py:2537: in __getattr__
    return super(AtomGroup, self).__getattr__(attr)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <AtomGroup with 1 atom>, attr = 'occupancies'

    def __getattr__(self, attr):
        selfcls = type(self).__name__
        if attr in _TOPOLOGY_ATTRS:
            cls = _TOPOLOGY_ATTRS[attr]
            if attr == cls.singular and attr != cls.attrname:
                err = ('{selfcls} has no attribute {attr}. '
                       'Do you mean {plural}?')
                raise AttributeError(err.format(selfcls=selfcls, attr=attr,
                                                plural=cls.attrname))
            else:
                err = 'This Universe does not contain {singular} information'
>               raise NoDataError(err.format(singular=cls.singular))
E               MDAnalysis.exceptions.NoDataError: This Universe does not contain occupancy information


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.