Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Saber

Saber reconstructs two non-negative, total-preserving expression channels from a single-cell gene-expression matrix. The two channels capture complementary cross-cell expression distributions for each gene. They are exchangeable by default: biological direction is assigned only when an external anchor or reference is supplied after reconstruction.

This repository contains the core implementation used in the accompanying manuscript, its software environment and a small executable example. It does not contain raw sequencing data, large processed matrices, or dataset-specific downstream analysis and visualisation code.

Installation

The tested environment can be created with Conda:

conda env create -f environment.yml
conda activate saber

Minimal example

Run the included example from the repository root:

bash run_example.sh

The script creates a small AnnData object, runs Saber on three genes and checks that the two returned matrices sum to the supplied expression matrix.

Run Saber on an AnnData matrix

The input .h5ad file should contain cells in rows, genes in columns and a finite, non-negative expression matrix in .X.

source config/example_run.env
python saber/run.py DATA_ROOT INPUT.h5ad OUTPUT_ROOT RUN_NAME

Results are written to OUTPUT_ROOT/RUN_NAME/final/Pearson/. The primary channel matrices are adata_F.h5ad and adata_M.h5ad; these filenames are retained for software compatibility and correspond to Channel 1 and Channel 2 unless an external orientation step is enabled. exp_combined.csv contains both channel values, and gene_numerical_status.tsv records estimation status by gene.

By default Saber uses all available cores for gene-level fitting. Set SABER_N_JOBS before execution to choose a different number. Other settings and their defaults are listed in config/runtime_defaults.tsv.

External orientation

Saber fitting uses total expression only. Optional marker-anchor and reference-matrix orientation are disabled by default and are configured through the environment variables documented in config/runtime_defaults.tsv. Orientation selects a direct or swapped channel order; it does not refit or rescale the reconstructed profiles.

Repository scope

  • saber/: mixture fitting, constrained reconstruction, readout and optional orientation
  • config/: documented runtime settings
  • tests/: the executable example and focused contract tests
  • tools/: the prespecified readout-profile selection helper

Quantitative figure values are provided separately as Source Data with the manuscript. Public dataset accessions and preprocessing choices are described in the Methods and Supplementary Information.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages