Skip to content

mpc-bioinformatics/ProtGraphREST

Repository files navigation

[WIP] ProtGraphREST

A protein graph REST-API to query generated pickle-graphs from ProtGraph.

This project currently only allows to query peptides from already known paths. Therefore, there is currently only one possible query-point.

REST-API

To query a peptide (with a given path, here 0->2->4->177), access the following url: <url>/ACCESSION/path_to_peptide?path=0,2,4,177. It will return the peptide in plain text, which can be then parsed. It is also possible to query multiple paths at once, yielding a new line seperated list of the corresponding peptides.

Examples

curl http://localhost:8000/A0A4S5AXF8/path_to_pep?path=0,13,14,15,16,245
VASS

curl http://localhost:8000/A0A4S5AXF8/path_to_pep?path=0,13,14,15,16,245&path=0,14,15,16,17,245
VASS
ASSM

More Examples can be found under <url>/swagger. The OpenAPI-yaml specification is located in the folder resources.

Startup

To start this project, clone it first via git.

Install the dependencies via pipenv install and start the shell with: pipenv shell

Currently the entrypoint is: main.py

To start ProtGraphREST, you need to specificy a base folder, which contains exported pickle files from ProtGraph. Make sure to export those graphs via the additonal argument (-edirs), so that ProtGraphREST can access the generated graphs.

Example: Graphs were or are currently generated by ProtGraph in /test/examples/ (via -epickle, -edirs)

Simply run: python main.py /test/examples and the graphs can then be queried via REST.

About

A REST-API for generated protein graphs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages