Giter Club home page Giter Club logo

bel-repository's Introduction

BEL Repository build zenodo

A utility for loading data from repositories of BEL documents with PyBEL [1].

Installation Current version on PyPI Stable Supported Python Versions License

bel_repository can be installed from PyPI with the following command:

$ pip install bel-repository

The latest version can be installed from GitHub with:

$ pip install git+https://github.com/pybel/bel-repository.git

Usage

from typing import Mapping

from bel_repository import BELRepository
from pybel import BELGraph

# Build a repository by giving a folder
bel_repository = BELRepository('/path/to/folder/with/bel/')

# Get a mapping from paths to graphs
graphs: Mapping[str, BELGraph] = bel_repository.get_graphs()

# Get a combine graph
graph: BELGraph = bel_repository.get_graph()

Example BEL Repositories

Each of these repositories has BEL content that can be pip installed:

More publicly available BEL content can be found in the listing in this blog post.

References

[1]Hoyt, C. T., et al. (2017). PyBEL: a computational framework for Biological Expression Language. Bioinformatics (Oxford, England), 34(4), 703โ€“704.

bel-repository's People

Contributors

cthoyt avatar

Stargazers

 avatar

Watchers

 avatar  avatar

bel-repository's Issues

Implement distributed repository

Should be able to take a list of strings with links to git repositories and take care of cloning, installing, and updating them in a temporary cache.

from bel_repository import DistributedBELRepository

urls = {
    'hbp_knowledge': 'https://github.com/pharmacome/knowledge.git',
    'neurommsig_knowledge': 'https://github.com/neurommsig/neurommsig-knowledge.git',
}

distributed_bel_repository = DistributedBELRepository(
    urls=urls, 
    metadata=...,
)

# Should be able to get graphs the same way and follow the 
# same public API as bel_repository.BELRepository
graphs = distributed_bel_repository.get_graphs()

Normalization with Bio2BEL

Also, report the percentage of nodes that have been mapped back to useful identifiers, show MIRIAM identifiers and link to identifiers.org

Upgrade bel_repository to new version of pybel

Hi @cthoyt

When you get a chance, the current bel_repository expects to_web(), which hasn't been in pybel since 0.14.6

Sincerely,

Jeremy

~/.pyenv/versions/anaconda3-2019.10/lib/python3.7/site-packages/bel_repository/repository.py in <module>
     17 
     18 import pybel
---> 19 from pybel import BELGraph, Manager, from_bel_script, to_indra_statements, to_web, union
     20 from pybel.cli import connection_option, host_option
     21 from pybel.constants import CITATION, CITATION_DB, CITATION_IDENTIFIER

ImportError: cannot import name 'to_web' from 'pybel' (/Users/zuck016/.pyenv/versions/anaconda3-2019.10/lib/python3.7/site-packages/pybel/__init__.py)

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.