Skip to content

zqfang/toucan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Toucan

Overview

Toucan is an app that allows you visualize your large-scale single-cell data in a desktop PC.

Download the pre-compiled binaries.

screenshot

Features

  • Visualize single cell data: scRNA-seq, 10x Visium, NanoString Cosmx, etc
  • Visualize anndata file: hdf5, zarr
  • No Python or R runtime is required
  • Out-of-core, serverless, and data stays on your device.
  • Cross-platform: Windows, macOS, Linux, Android, iOS
  • Fast Wilcoxon test (Rust implementation of wilcoxauc )
  • scalable for millions of cells.

Usage

Please refer to Cirrocumulus

Installation

  1. Install hdf5 C library
  • On MacOS, you can install it via:
brew install hdf5@1.10

after install toucan, in terminal, run

# to fix app could not open issue
sudo xattr -r -d com.apple.quarantine /Applications/Toucan.app
  • On Linux, you can install it via:
sudo apt install libhdf5-dev
  • On Windows, no extra installation needed.
# not required
winget install --id HDFGroup.HDF5 --source winget
  1. Download the precompile binaries and install.
  2. Run the app

Input Requirements

Anndata

Toucan supports the following on-disk formats:

  • anndata-hdf5
  • anndata-zarr (recommended, speed++)

For seurat object, you can convert it to anndata-hdf5 with the following commands:

# in R, install
remotes::install_github("zqfang/MuDataSeurat")
# then
MuDataSeurat::WriteH5AD(seurat_obj, 
                        file = "data.h5ad", 
                        assay="RNA",
                        sparse.type='csc_matrx', 
                        scale.data = FALSE)


# or use 
remotes::install_github("scverse/anndataR")
adata = anndataR::from_Seurat(seurat_obj, 
                      assay_name = "SCT", 
                      x_mapping = 'data', 
                      layers_mapping =list(counts = "counts"))
adata$write_h5ad("data.h5ad")

Spatial Transcriptoimcs (optional)

In addition to anndata file, if you want to visualize spatial transcriptomics data, put the following two files in the same directory as the anndata file:

  1. spatial coordinates:
    • same filename prefix as the anndata file, but with .image.positions.csv extension.
    • the csv file needs 3 columns: cell_id, x, y.
  2. spatial images: same filename prefix as the anndata file, but with image.png/jpg extenstion.
--|
  |-- data.h5ad
  |-- data.image.positions.csv
  |-- data.image.png

see an spatial example input in the example data folder

Credits

The frontend UI is taken from from Cirrocumulus with substantial amount of changes to adpt to the needs of Toucan.

About

large scale single cell visualization on a desktop PC

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published