Single cell analysis in the browser
This repository is now migrated to kanaverse. This fork keeps the legacy version of kana(v2) accessible. For all future updates, check out GitHub:kanaverse.
The new Kana app is hosted at kanaverse.org/kana.
Kana comes from the Telugu word kaṇaṁ (కణం), which means ... drumroll... cell
Checkout our preprint on bioRxiv
kana is a web application for single-cell RNA-seq data analysis that works directly in the browser. That's right - the calculations are performed client-side, by your browser, on your computer! This differs from the usual paradigm of, e.g., Shiny applications where data needs to be sent to a backend server that does the actual analysis. Our client-side approach has a number of advantages:
If you have a Matrix Market (.mtx
) file or HDF5 (tenx V3 or AnnData
representation stored as h5ad), or SummarizedExperiment
(or derivatives like SingleCellExperiment
) stored as an RDS file, or an ExperimentHub id, you're ready to go.
genes.tsv
or features.tsv
file to identify marker genes properly.The standard analysis follows the flow described in the Orchestrating Single-Cell Analysis with Bioconductor. Briefly, this involves:
batch
column in the cell annotations, or load multiple datasets where each dataset is considered a batchThe interface provides a depiction of the dimensionality reduction of choice, a ranking of marker genes for the cluster of interest, and diagnostic plots from the individual analysis steps.
for release notes and changelog, read here
Tips and tricks:
Deployment is as easy as serving the static files in this repository via HTTPS. Indeed, our deployment is just being served via GitHub Pages. As promised, there's no need to set up a backend server.
We have significantly revamped the entire application and the underlying infrastructure to support hybrid compute - either purely client-side with webassembly, or on backend systems through node, or both.
kana uses the scran.js library for efficient client-side execution of scRNA-seq analysis steps. This uses a variety of C/C++ libraries compiled to WebAssembly to enable heavy-duty calculations in the browser at near-native speed.
All computations performed by kana run in a Web Worker. This avoids blocking on the main thread and allows the application to be more responsive. Data is sent to the main thread on an as-needed basis, e.g., for visualizations. We also create separate Web Workers for the t-SNE and UMAP steps so that they can be run concurrently for maximum efficiency.
The WASM code itself is compiled with PThreads support to enable parallelization of some analysis steps.
This involves the use of a SharedArrayBuffer
to efficiently share memory across Web Workers,
which in turn requires cross origin isolation of the site.
We achieve this by using a service worker to cache the resources and load the blobs with the relevant headers - hence the need for HTTPS.
bakana
). One can extend Kana to interact to this API (#good-first-issue).kana
files). This package specifies the formats and provides readers for parsing various versions.Install dependencies:
npm install or yarn # depending on what you use
To start the app:
yarn start # if using yarn, highly recommended
npm run start # if using npm
This usually runs on port 3000 unless something else is already running on the same port.
For the curious: this project was bootstrapped with the Create React App.