statgen / locuszoom

A Javascript/d3 embeddable plugin for interactively visualizing statistical genetic data from customizable sources.
https://statgen.github.io/locuszoom/
MIT License
154 stars 29 forks source link

Proof of concept: file/ URL based tabix in browser #140

Closed abought closed 6 years ago

abought commented 6 years ago

Purpose

Demonstrates reading tabix-indexed binary data in browser, based on parsers from BioDalliance. Supports both local and remote files.

This is a simplest proof of concept- additional work can be done to add UI components and handle variable GWAS field contents.

The parsers are extracted from BioDalliance; see build commands used to extract here: https://github.com/abought/dalliance/tree/feature/gh137-external-tabix

How to test this

The portal dev box has a variety of GWAS files used to create our public datasets. They can be tabix-indexed and fed to the parser with appropriate config options.

Many local development servers (flask, django, jetbrains, etc) do not support Range headers, making it hard to perform byte-range requests.

This node package has been useful in initial development, though it does not correctly report Accept-Range in response to a HEAD request. https://www.npmjs.com/package/http-server

From ~/some_data_folder, run as follows:

$ http-server . --cors

abought commented 6 years ago

There's enough of a distinct UI layer that I'm moving this to a separate repo- reusable widgets for specific apps. See live demo: https://abought.github.io/locuszoom-tabix/