hackathon-marseille

GREEKC hackathon training event

View the Project on GitHub GREEKC/hackathon-marseille

Interfacing ReMap2020 (in dev locally) with REST API

Motivation

We are currently developping the new web interface of ReMap. It runs on:

How to plug REST to ReMap/Laravel

Which REST queries to make ?

Ask users, and list below the queries.

Deliverable

User needs - Questions - REST entry points

Entry points

Entry point - ReMap metadata

Output wanted: BED / JSON Limit requests per seconds (20 requests /second)

Trying laravel eloquent

Entry points - Peaks with coordinates query

We need to investigate the tools needed to code this.

Output wanted: BED / JSON Limit requests per seconds (20 requests /second)

Using a different ORM (Object-relational mapping)

It appeared that we may need to change the way we communicate to the database, using Eloquent as ORM for Laravel. This will change fundamentaly our code, which need to be updtaed. This involve extra coding time.

Coding 1st entry point - listing datasets for a given TF

This uses MySQL stored procedures

http://localhost:8090/REST_API/v1/tf=STAT3

First REST query

Coding 2nd entry point - listing Targets

This is uses Eloquent ORM, lists the table target_label

First REST query

Coding 3rd entry point - Experiments

This is uses Eloquent ORM, lists the table Experiments, with target, and experiemnt_info

First REST query

Testing MongoDB - to insert 80M peaks

Lets try mongodb from https://hub.docker.com/_/mongo

docker pull mongo

– Create database docker run --name mongo-testremap -d mongo:xenial a6dc9cc10c153128e640361f16ca3ccb89ee2b6b5312a28f3ed1a16ddea9be33

docker run --name mongo-testremap -v /my/own/datadir:/data/db -d mongo

The -v /my/own/datadir:/data/db part of the command mounts the /my/own/datadir directory from the underlying host system as /data/db inside the container, where MongoDB by default will write its data files.

docker exec -it mongo-testremap mongoimport --db mongo-testremap --collection peaks --type tsv --file remap2015_all_macs2_hg38_v1.bed --fields chr,start,name,score,strand,thickStart,thickEnd,itemRgb

STUCK here

Conclusion

Expected attendees