We like looking at things!

Description
National Reconnassance Office (Declassified Sep. 2011)

We build papers around (...static...) figures

  • 2013: it's gonna be the future soon!
  • Dead trees aren't terribly important for effective communication
  • (Limited) pixels are
  • Why do we present things in such static ways?


What about interaction?

Applications

  • ~170kb of Javascript to embed a browser
    • ...in a larger genomics application or DB frontend
    • ...in a blog-post
    • ...in a publication (?)
    • ...in a talk!
  • Integrate data from many sources.
  • Map between assemblies on the fly
  • Display data in many ways (stylesheets)
  • Export publication-quality graphics (SVG)... if you really need to

For examples, see http://biodalliance.org/about.html

Where's the server?

All data integration happens client-side, in Javascript...

Just one bit of "magic" needed...

Access-Control-Allow-Origin: *

W3C Cross Origin Resource Sharing (CORS) spec.

Marks resources as available for integration

Can also be made to play well with security (passwords, sessions, encryption), although things get slightly more complex.

No really, where's the server?

One option: use DAS

http://my.das.server/das/human_genes/features?segment=22:30000000,31000000
<FEATURE id="ENST00000331728-1" label="LIMK2">
<TYPE id="transcript">transcript</TYPE>
<METHOD id="protein_coding">protein_coding</METHOD>
<START>29938250</START>
<END>29938410</END>
<ORIENTATION>+</ORIENTATION>
<NOTE>LIM domain kinase 2 (LIMK-2)(EC 2.7.11.1)</NOTE>
<GROUP id="ENST00000331728" type="transcript" label="LIMK2">
<LINK href="http://ncbi36.ensembl.org/Homo_sapiens/Gene/Summary?t=ENST00000331728" />
</GROUP>
<GROUP id="ENSG00000182541" type="gene" label="LIMK2" />
</FEATURE>

No really, where's the server?

Alternative: binary data over the wire

Formats like bigWig and BAM include indices

 var req = new XMLHttpRequest();
 req.setRequestHeader('Range', 'bytes=' + startPos + '-' + endPos);
 req.open('GET', url, true);
 req.responseType = 'arraybuffer';

Typed arrays

var bytes = new Uint8Array(response);
var doubles = new Float64Array(response);

Performance not too bad: gzip about 3x slower than C.

Performance still improving

Plans for 2013/13

  • More formats/backends
    • GFF3, VCF (with Tabix indices)
    • JSON (InterMine, Ensembl, etc.)
    • UCSC-compatible track- and assembly-hubs
  • More navigation tools, e.g. jump between peaks
  • More configurable
  • Faster!

<Thank You>

  • Tim Hubbard Group
  • BBSRC