The DNAnexus Javascript Libraries are a collection of libraries that make it easy to integrate your javascript application with the DNAnexus platform. The complex functionality that is required to upload large files efficiently is available in only a few lines of code.
var api = new DX.Api("AUTH_TOKEN_GOES_HERE");
api.call("user-bob", "describe").done(function(userData) {
alert("user-bob's full name is " + [userData.first, userData.last].join(" "));
});
The various libraries provided have different dependencies. All DNAnexus Javascript libraries rely on jQuery's Deferred object, as promises are not yet standardized across all common browsers. See the libraries below for the exact dependencies.
- API - Basic javascript bindings for making API calls
- Upload - Adds ability to upload files to the platform
The examples below are intended to demonstrate how to use the libraries. The examples were built quickly and are not meant to demonstrate how to properly build a web application/component.
- Getting Started - Basic usage, making an API call
- Basic file upload - Bare bones uploading of files
- Advanced file upload - Rich file uploading with all the bells and whistles