For examples, see http://biodalliance.org/about.html
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.
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>
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