All Projects → biowasm → Aioli

biowasm / Aioli

Licence: mit
Framework for building fast genomics web tools with WebAssembly and WebWorkers

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Aioli

Fastq.bio
An interactive web tool for quality control of DNA sequencing data
Stars: ✭ 76 (+49.02%)
Mutual labels:  webassembly, wasm, genomics
Rhai
Rhai - An embedded scripting language for Rust.
Stars: ✭ 958 (+1778.43%)
Mutual labels:  webassembly, wasm
Hvue
A GopherJS & go/wasm binding for Vue.js
Stars: ✭ 50 (-1.96%)
Mutual labels:  webassembly, wasm
Wasm Sort
WebAssembly sort algorithms compiled by C.
Stars: ✭ 34 (-33.33%)
Mutual labels:  webassembly, wasm
Wasm Check
TypeScript / JavaScript library for detect WebAssembly features in node.js & browser
Stars: ✭ 30 (-41.18%)
Mutual labels:  webassembly, wasm
Cppwasm Book
📚 WebAssembly friendly programming with C/C++ -- Emscripten practice
Stars: ✭ 956 (+1774.51%)
Mutual labels:  webassembly, wasm
Photon
⚡ Rust/WebAssembly image processing library
Stars: ✭ 963 (+1788.24%)
Mutual labels:  webassembly, wasm
Terrarium Templates
Template and example projects for Fastly Labs Terrarium https://wasm.fastlylabs.com
Stars: ✭ 21 (-58.82%)
Mutual labels:  webassembly, wasm
Rustwasm Addon
🦀 + 🕸 + 🦊 // A web-extension to reverse a string. Yep.
Stars: ✭ 41 (-19.61%)
Mutual labels:  webassembly, wasm
Winter
Haskell port of the WebAssembly OCaml reference interpreter
Stars: ✭ 42 (-17.65%)
Mutual labels:  webassembly, wasm
Tinygo
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
Stars: ✭ 9,068 (+17680.39%)
Mutual labels:  webassembly, wasm
Smartcircle
✂️Automatically determine where to crop a circular image out of a rectangular.
Stars: ✭ 29 (-43.14%)
Mutual labels:  webassembly, wasm
Node Wasm
Import and use wasm in node
Stars: ✭ 28 (-45.1%)
Mutual labels:  webassembly, wasm
Wasmsign
A tool to add and verify digital signatures to/from WASM binaries
Stars: ✭ 31 (-39.22%)
Mutual labels:  webassembly, wasm
Bionic
** Bionic - An Ionic CLI clone for Blazor projects ** moved to:
Stars: ✭ 28 (-45.1%)
Mutual labels:  webassembly, wasm
Wasmboy
Game Boy / Game Boy Color Emulator Library, 🎮written for WebAssembly using AssemblyScript. 🚀Demos built with Preact and Svelte. ⚛️
Stars: ✭ 963 (+1788.24%)
Mutual labels:  webassembly, wasm
Hidamari
Modern operating system aimed at running WebAssembly code.
Stars: ✭ 49 (-3.92%)
Mutual labels:  webassembly, wasm
Notecalc3
NoteCalc is a handy calculator trying to bring the advantages of Soulver to the web.
Stars: ✭ 879 (+1623.53%)
Mutual labels:  webassembly, wasm
Wagon
wagon, a WebAssembly-based Go interpreter, for Go.
Stars: ✭ 882 (+1629.41%)
Mutual labels:  webassembly, wasm
Json2excel
Generate excel file from json data
Stars: ✭ 40 (-21.57%)
Mutual labels:  webassembly, wasm

Aioli

npm

Aioli is a framework for building fast genomics web applications using WebAssembly and WebWorkers.

Tools using Aioli

Tool URL Repo
Ribbon genomeribbon.com MariaNattestad/Ribbon
Alignment Sandbox alignment.sandbox.bio RobertAboukhalil/alignment-sandbox
fastq.bio fastq.bio RobertAboukhalil/fastq.bio
bam.bio bam.bio RobertAboukhalil/bam.bio

Getting Started

As shown below, you can obtain Aioli from our biowasm CDN, or you can install it from npm: npm install @biowasm/aioli (use the npm option if you need to host the Aioli module locally).

A simple example

Here's Aioli in action running the genomics tool samtools on a small SAM file:

<script src="https://cdn.biowasm.com/aioli/latest/aioli.js"></script>
<script>
let samtools = new Aioli("samtools/1.10");

document.write("Loading...");
samtools
    // Initialize samtools
    .init()
    // Run "samtools view" command with "-q 20" filter
    .then(() => samtools.exec("view -q 20 /samtools/examples/toy.sam"))
    // Output result
    .then(d => document.write(`<pre>${d.stdout}\n${d.stderr}</pre>`));
</script>

Working with user files

We can update the previous example to run samtools on a file provided by the user:

<input id="myfile" type="file" multiple>

<script src="https://cdn.biowasm.com/aioli/latest/aioli.js"></script>
<script>
let samtools = new Aioli("samtools/1.10");

// Initialize samtools and output the version
samtools
    .init()
    .then(() => samtools.exec("--version"))
    .then(d => console.log(d.stdout));

// When a user selects a .sam file from their computer,
// run `samtools view -q20` on the file
function loadFile(event)
{
    Aioli
        // First mount the file
        .mount(event.target.files[0])
        // Once it's mounted, run samtools view
        .then(f => samtools.exec(`view -q20 ${f.path}`))
        // Capture output
        .then(d => console.log(d.stdout));
}
document.getElementById("myfile").addEventListener("change", loadFile, false);
</script>

Aioli Configuration

Simple

// -------------------------------------
// Format: <module>/<version>
// -------------------------------------

// Retrieve specific version (recommended for stability)
new Aioli("seqtk/1.2");

// Retrieve latest version
new Aioli("seqtk/latest");


// -------------------------------------
// Format: <module>/<program>/<version>
// -------------------------------------

// For most bioinformatics tools, <module> == <program>
new Aioli("seqtk/seqtk/1.2");

// But not always! Some tools have multiple sub-tools
new Aioli("seq-align/smith_waterman/1.2");
new Aioli("seq-align/needleman_wunsch/1.2");

Advanced

By default, Aioli retrieves the .wasm modules and the Aioli WebWorker code from the biowasm CDN for convenience, but you can also load files from local sources:

new Aioli({
    module: "seq-align",
    program: "smith_waterman",              // optional (defaults to $module)
    version: "latest",                      // optional (defaults to latest)
    urlModule: "./path/to/wasm/files/",     // optional (defaults to biowasm CDN)
    urlAioli: "./path/to/aioli.worker.js",  // optional (defaults to biowasm CDN)
});

Background info

What is WebAssembly?

WebAssembly is a fast, low-level, compiled binary instruction format that runs in all major browsers at near native speeds. One key feature of WebAssembly is code reuse: you can port existing C/C++/Rust/etc tools to WebAssembly so those tools can run in the browser.

What is a WebWorker?

WebWorkers allow you to run JavaScript in the browser in a background thread, which keeps the browser responsive.

Compiling into WebAssembly

See the biowasm project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].