WebAssembly modules for common genomics utilities, including:
- samtools v1.10 (and htslib)
- bedtools v2.29
- fastp v0.20.1
- seqtk v1.3
- wgsim
- bhtsne
- seq-align
For convenience, biowasm modules are compiled to WebAssembly and hosted on cdn.sandbox.bio.
For a simple starter example, see Aioli.
# Emscripten version to use (most tools were tested with 1.39.1)
TAG=1.39.1
# Fetch Emscripten docker image
docker pull robertaboukhalil/emsdk:$TAG
# Create the container and mount ~/wasm to /src in the container
docker run \
-dt \
-p 12345:80 \
--name wasm \
--volume ~/wasm:/src \
robertaboukhalil/emsdk:$TAG# Go into your container
docker exec -it wasm bash
# Compile seqtk
cd biowasm/
make seqtk
# This will create tools/<tool name>/build with .js/.wasm files
ls tools/seqtk/buildFirst, add the tool as a git module:
# Fetch codebase
mkdir -p tools/seqtk
git submodule add https://github.com/lh3/seqtk.git tools/seqtk/src
# Get specific version of the tool
cd tools/seqtk/src
git checkout v1.3
cd -
# Stage changes for git
git add tools/seqtk/src .gitmodulesYou should also create the following files:
tools/<tool>/
README.md Details about the tool and dependencies
compile.sh Script that will run to compile the tool to WebAssembly (can use `$EM_FLAGS` for common flags)
patch Patches that need to be applied to the code to compile it to WebAssembly (optional)