Access Sparrowhawk at https://sparrowhawk.bacpop.org
Sparrowhawk is a WebAssembly toolkit for analysis of bacterial genomes including:
- Genome assembly with sparrowhawk-asm.
- Mapping with ska.rust and visualisation with MSEABOARD.
- Reference-free alignment with ska.rust and phylogeny with taxonium.
- Single-linkage transmission networks with ska.rust and transmission_estimator.
- Clustering and embedding with mandrake.rust.
- Taxonomic identification (species-identification) with sketchlib.rust and gemsparcl.
- Annotation of genes with prodigal via orphos.
- Host read depletion with deacon.
- AMR gene detection with a k-mer-ized AMRFinderPlus database.
- Protein embedding with ESM-2 (8M).
Docs are here: https://sparrowhawk-docs.bacpop.org
- Easy: WebAssembly (WASM) runs directly in your browser, so no installation is needed.
- Private: Everything is processed locally, on your own machine, so no data is transferred to external servers.
- Fast: All code is optimised for rapid analysis, and some modules even support using your local GPU for increased speed.
- Up-to-date: Our packages build both native and WASM code, so the latest features and updates continue to be included.
For larger analyses, some browsers (Chrome, Safari, Edge) are faster than others.
Sparrowhawk was at one time the Archmage of Earthsea. Also, the sparrowhawk (Accipiter nisus) is a bird of prey native to Europe (and the island of Gont).
For fans and haters of backronyms: Speedy Private ARchitecture Running On-device WHich Analyses With K-mers
- Víctor Rodríguez Bouza
- John Lees
- Bede Constantinides
- Luca Nesterenko
- Erikson Odih
- Andrea Epifani
- Antoine Andreoletti
This is a work in progress project. This in particular implies:
- Not all the main features we want are yet implemented.
- Code might be messy, and not even documented.
- General documentation on how to install and use the tool might be short or even missing.
- Finding unexpected errors/behaviour or bugs should not be a surprise.
- Some features might be partially hardcoded.
These (and potentially other) items will be progressively fixed before version 1.0.
We have created a guide that details an example on how would such a method be created. Additionally, we have prepared a SKILLS.md and a AGENTS.md in the case you want to draft or outline such a project with the help of LLMs. Point them to the SKILLS.md file, that is designed to guide them developing both the interface of your method to the web part, and the web itself. We have improved this file by doing two exercises manually. We have adapted the nice bioinformatics read mapping crate rammap-rs to an Sparrowhawk analogous web in rammap-web. Additionally, and to show the applicability on other scientific fields, we have done a small port of the Combine toolkit, in C++ and Python, to Rust, and taking advantage of the Rust port of Minuit2 of minuit2-rs, and a slightly extended oxyroot-rs, we created combine-web using Sparrowhawk as scaffold.
Development has been done only on x86_64 GNU/Linux-based systems, and most surely will probably stay that way (i.e. no other systems have been tested). To use it you will need to have NPM installed, as well as a working Rust installation (check the official Rust website for information on how to get it) and then download and install the required packages as follows (for example, to get the v0.1.2 version)
git clone --branch v0.1.2 --recurse-submodules https://github.com/bacpop/sparrowhawk.git
cd sparrowhawk/www
npm install
It has been found that there is an issue when compiling some crates to wasm32-unknown-unknown in macOS due to the weird clang packaging there. Following this issue, it seems that installing llvm fixes it.
Once you have it installed, you can run the following, that will automatically compile to WebAssembly sparrowhawk-asm and run the development server locally (from the www folder!):
npm run serve
