Seqservice

a web-based sequence analysis service

Toni Hermoso Pulido (@toniher)

Bioinformatics Core Facility

Centre for Genomic Regulation (BCN)

https://biocore.crg.eu


What to address?

 

  • Easy to use sequence analysis interface for end-users
    • For now BLAST & HMMER
  • Usage of popular (NCBI) or custom-made sequence databases
  • Plugging other services to the results
    • Bypass
    • GO enrichment
    • etc.

Initial application:

studying Moonlighting

  • Molecule with a different function apart from a canonical one
  • Not exactly the same as enzymatic promiscuity

 

Moonlighting examples

Aconitase

citrate to isocitrate vs RNA binding and more

 

Hexokinase

Fructose and glucose phosphorylating enzyme vs apoptosis

 

MultiTask DB

Bypass. Fuzzy logics

Technology behind...

BLAST output (XML)

NoSQL

Not Only SQL

It was CouchDB...

A web document DBMS

Document Database

  • Schema is not predefined
    • Schema-free or schema-less are not necessarily true
    • Application renders the logics
  • Document defines the schema
  • JSON can be validaded (JSON Schema or JSON-LD)

JSON Document

CouchDB Document

CouchDB Document

  • _id: Identifier of document
  • rev: revision of document

 

 

  • ref: defined property for linking documents

CouchDB - REST API

Everything is WEB

EVERYTHING, for the good and for the bad…

CRUD

 

Operation                    SQL                    HTTP
Create                            INSERT              PUT / POST
Read (Retrieve)            SELECT              GET
Update (Modify)          UPDATE            PUT / PATCH
Delete (Destroy)          DELETE             DELETE

Adding document

curl -H 'Content-Type: application/json' \
            -X POST http://127.0.0.1:5984/mydb \
            -d '{"seq": "GATC"}'
{"ok":true,"id":"8843faaf0b831d364278331bc3001bd8",
 "rev":"1-33b9fbce46930280dab37d672bbc8bb9"}

Reading document

curl -X GET http://127.0.0.1:5984/mydb/8843faaf0b831d364278331bc3001bd8
{"_id":"8843faaf0b831d364278331bc3001bd8",
 "_rev":"1-33b9fbce46930280dab37d672bbc8bb9",
 "seq":"GATC"}

But now PouchDB...

A postmodern/liquid DBMS

¿ Server <-> Client ?

PouchDB Syncing

  • terminal - NodeJS (e.g. levelDB)
  • browser (e.g. indexedDB)
  • server (couchDB)

with the same RESTful syntax.

PouchDB examples

// Create Browser DB
var db = new PouchDB('mydb');

// Create CouchDB DB
var db = new PouchDB('http://website:5984/mydb');
db.get('mydoc').then(function (doc) {
  // handle doc
}).catch(function (err) {
  console.log(err);
});

Create DB

Retrieve document - promise

Accessing web DBs with Fauxton

WebSockets

Implementation: Socket.io

  • No need to refresh or load other pages
  • Continuous output from socket
  • Binary streaming

WebSockets

Realtime communication

Docker

Bring it everywhere

  • Simplify installation
  • Independent of your OS

Need to create Dockerfile. Kinda' Bash file

Docker

docker pull toniher/seqservice

or

git clone https://github.com/toniher/seqservice
docker build -t seqservice .




docker run -p 10030:10030 -d seqservice


http://localhost:10030/seqservice/

Looking for new applications!

Thanks!