Skip to main content

A Single-Cell Lineage Simulator with Fate-Aware Gene Expression

Project description

LineageSim

A simulator for single-cell lineage tracing data that generates fate-aware gene expression — progenitor cells carry transcriptomic signatures of their descendants' fates, capturing a key property of real developmental data.

Installation

Requires Python >= 3.11.

pip install lineagesim

Or for development:

uv sync

CLI Usage

# See all available options
lineagesim generate --help

# Generate with default parameters
lineagesim generate -o dataset.h5ad

# An example showing full control of simulation parameters
lineagesim generate \
    --n-cells 4096 --n-genes 500 --n-cif 32 \
    --beta 0.3 --sigma 0.5 --commit-depth 7 \
    --gene-effect-prob 0.3 --scale-s 1.0 \
    --protocol UMI --skip-technical-noise \
    --seed 42 -o dataset.h5ad

Python Quickstart

from lineagesim.simulator import LineageSim

sim = LineageSim()
tree, expression = sim.generate_dataset(
    n_cells=8192,
    n_genes=1000,
    beta=0.2,
)
# tree: dict mapping cell IDs to metadata (fate, parent, depth, etc.)
# expression: (n_cells, n_genes) array of observed counts

Parameters

generate_dataset() accepts the following parameters:

Parameter Type Default Description
n_cells int 8192 Number of cells to simulate
n_genes int 3000 Number of genes to simulate
n_CIF int 32 Number of Cell Identity Factors (latent dimensions)
sigma float 0.2 Brownian motion noise std dev
beta float 0.2 Fate signal strength
gene_effect_prob float 0.3 Probability that a CIF affects a gene
scale_s float 1.0 Transcription rate scaling factor
protocol str "UMI" Sequencing protocol ("UMI" or "nonUMI")
skip_technical_noise bool False If True, return true counts without technical noise
commit_depth int 7 Depth at which fate commitment occurs

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lineage_simulator-0.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lineage_simulator-0.1.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file lineage_simulator-0.1.0.tar.gz.

File metadata

  • Download URL: lineage_simulator-0.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for lineage_simulator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 47ce488b906c5a18fde765465163ad16be743d961af1c27254012ed6a3219286
MD5 6ee6123e3b9c9e2a6f617b324bc5d3f6
BLAKE2b-256 69f438d1c6333c5feec012a758ef0af390d09841f6cd2664c10bbb1a50120cda

See more details on using hashes here.

File details

Details for the file lineage_simulator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lineage_simulator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 924c0295a355323e693ce8294db3a874125e718cfd54660426739c8234fe02ce
MD5 242d003c60eb6ed4ba316da71b863bd5
BLAKE2b-256 3b46418d8c6be3334f9d3695ad838d69cc4ac6dd440c8e99db827a6e9dd30390

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page