Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/biocontainers/biocontainers-backend
Python backend for Biocontainers (Flask + MongoDB)
https://github.com/biocontainers/biocontainers-backend
biocontainers ga4gh ga4gh-server rest-api restful-api
Last synced: 6 days ago
JSON representation
Python backend for Biocontainers (Flask + MongoDB)
- Host: GitHub
- URL: https://github.com/biocontainers/biocontainers-backend
- Owner: BioContainers
- License: apache-2.0
- Created: 2018-11-13T12:02:43.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-08T16:11:54.000Z (8 months ago)
- Last Synced: 2024-11-04T07:36:11.399Z (16 days ago)
- Topics: biocontainers, ga4gh, ga4gh-server, rest-api, restful-api
- Language: Python
- Homepage: http://biocontainers.pro
- Size: 1.08 MB
- Stars: 3
- Watchers: 5
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Python 3.4](https://img.shields.io/badge/python-3.4-green.svg)](https://www.python.org/downloads/release/python-340/) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
BioContainers backed
=====================================================The BioContainers backed for the [Biocontainers Registry](http://biocontainers.pro/registry). The library defines two main components:
- BioContianers pipelines
- BioContainers Restful APIBioContainers Pipelines
----------------------------The BioContainers pipelines contains the tools and workflows to insert quay.io and and dockerhub containers. In addition,
it gets the information from containers recipes Dockefile or Conda recipes to annotate the containers.## Pre-requisites
- MongoDB
- Python > 3.4### Setting the environment
Before lunching the pipelines you should add to the ```PYTHONPATH``` the biocontainers-backend folder:
```bash
$ cd biocontainers-backend
$ export PYTHONPATH=$PYTHONPATH:./
```## Running the pipelines
The pipelines can be run using the following command:
```bash
python3.4 biocontainers/pipelines.py --config-file biocontainers/configuration.ini
```This will prompt the following options:
```
-q, --import-quayio Import Quay.io Recipes
-k, --import-docker Import Docker Recipes
-c, --config-file PATH
-a, --config-profile TEXT This option allow to select a config profile
-db, --db-name TEXT Name of the database
-h, --db-host TEXT Host the database
-auth, --db-auth-database TEXT Authentication database in Mongo
-u, --db-user TEXT Database root user
-pw, --db-password TEXT Database password
-p, --db-port TEXT Database port
--help Show this message and exit.
```BioContainers Flask API
--------------------------Kubernetes deployment
--------------------------In order to facilitate the testing and deployment of the **BioContainers Registry** Resource we have created a kubernetes
[helm charts deployment](https://helm.sh/). This will enable easy deployment of the solution in a kubernetes cluster or
in a local [minikube instalation](https://kubernetes.io/docs/setup/minikube/).### Prerequisites
- [Docker](https://www.docker.com/)
- [minikube](https://kubernetes.io/docs/setup/minikube/)
- [git](https://git-scm.com/)## Build the docker images
- Build the service
```bash
docker build -t ypriverol/biocontainers-api-py:1.0.0 .
docker push ypriverol/biocontainers-api-py:1.0.0
```- Build the pipelines:
```bash
docker build -t ypriverol/biocontainers-pipelines-py:1.0.0 .
docker build -t ypriverol/biocontainers-pipelines-py:1.0.0
```## Running in minikube
Deploying the API is really simple using the Kubernetes configuration:
```bash
helm install -f helm-example-configs/minikube.yaml ./biocontainer-registry
```Some important commands for kubernetes:
Remove container:
```
kubectl delete deployment biocontainers-pipelines-py
```How to Validate the API
------------------------------The API can be validated with the TRS validator tool: http://142.1.177.188:8080/trs/validator/debug?url=http://api.biocontainers.pro