Introduction
Single Rust is a pioneering library written in Rust, focused on high-performance analysis of single-cell data. It provides a robust and efficient toolkit for processing, analyzing, and visualizing single-cell genomics data.
Overview
Single Rust leverages Rust's performance, memory safety, and concurrency to provide a powerful alternative to existing Python-based single-cell analysis tools. The library is designed to handle large datasets efficiently, making it suitable for production-grade, high-throughput analysis pipelines.
Key Features
- High Performance: Native Rust implementation for maximum computational efficiency
- Memory Safety: Prevents common errors through Rust's ownership model
- Concurrency: Built-in parallel processing capabilities for large datasets
- Comprehensive Tools: Tools for loading, preprocessing, analyzing, and visualizing single-cell data
- Interoperability: Compatible with AnnData format for seamless integration with existing workflows
Architecture
Single Rust sits at the center of an ecosystem of specialized libraries:
- anndata-rs: Core data structures and I/O operations
- anndata-memory: In-memory optimized implementation
- single-algebra: Linear algebra and statistical methods
- single-svdlib: SVD implementations for dimensionality reduction
Together, these libraries provide a complete toolkit for single-cell analysis, from data loading to visualization.
Getting Started
To start using Single Rust, you'll need to add it to your Rust project:
[dependencies]
single_rust = "0.2.2-alpha.0"
A simple example of loading and processing single-cell data:
use anndata_memory::IMAnnData;
use single_rust::io::{read_h5ad_memory, FileScope};
use single_rust::memory::processing::compute_highly_variable_genes;
fn main() -> anyhow::Result<()> {
// Load data
let adata = read_h5ad_memory("data.h5ad")?;
// Find highly variable genes
compute_highly_variable_genes(&adata, None)?;
// Further processing...
Ok(())
}
Explore the rest of the documentation to learn about the various features and capabilities of Single Rust.