Skip to main content

scBoolSeq

scRNA-Seq data binarisation and synthetic generation from Boolean dynamics.

Installation

Pip

pip install scboolseq

Conda

conda install -c conda-forge -c colomoto scboolseq

Docker

scBoolSeq is included in the ColoMoTo Docker distribution.

Usage

Python API

Here a minimal example is presented, using the same dataset as the CLI usage guide. For further information, please check the documentation.

import pandas as pd
from scboolseq import scBoolSeq

# read in the normalized expression data
nestorowa = pd.read_csv("data_Nestorowa.tsv.gz", index_col=0, sep="\t")
nestorowa.iloc[1:5, 1:5] 
#                HSPC_031  HSPC_037  LT-HSC_001  HSPC_001
# Kdm3a          6.877725  0.000000    0.000000  0.000000
# Coro2b         0.000000  6.913384    8.178374  9.475577
# 8430408G22Rik  0.000000  0.000000    0.000000  0.000000
# Clec9a         0.000000  0.000000    0.000000  0.000000
#
# NOTE : here, genes are rows and observations are columns

scbool_nest = scBoolSeq()

##
## Binarization
##

# scBoolSeq expects genes to be columns, thus we transpose the DataFrame.
scbool_nest.fit(nestorowa.T) # compute binarization criteria

binarized = scbool_nestorowa.binarize(nestorowa.T)
binarized.iloc[1:5, 1:5] 
#             Kdm3a  Coro2b  8430408G22Rik  Phf6
# HSPC_031      1.0     NaN            NaN   0.0
# HSPC_037      0.0     1.0            NaN   0.0
# LT-HSC_001    0.0     1.0            NaN   1.0
# HSPC_001      0.0     1.0            NaN   1.0


##
## Synthetic RNA-Seq generation from Boolean states
##

# We load in a boolean trace obtained from the simulation of a Boolean model
boolean_trace = pd.read_csv("boolean_dynamics.csv", index_col=0)
boolean_trace
#             Kdm3a  Coro2b  8430408G22Rik  Phf6
# init          1.0     0.0            1.0   0.0
# transient_1   0.0     1.0            1.0   0.0
# transient_2   0.0     1.0            0.0   1.0
# stable_state  0.0     1.0            1.0   1.0

synthetic_scrna_pseudocounts = scbool_nestorowa.sample_counts(boolean_trace) 

Contributors

Release files for scBoolSeq 2.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scBoolSeq 2.3.4
File Size Uploaded
scboolseq-2.3.4.tar.gz 28.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scBoolSeq 2.3.4
File Interpreter ABI Platform
scboolseq-2.3.4-py3-none-any.whl Python 3 none any Details

Total release size: 60.8 kB

Release files / scboolseq-2.3.4.tar.gz

Download URL scboolseq-2.3.4.tar.gz
Size 28.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a094d92b98f11b0abca94fdb186f9e216c3bd6652b47bea3113142a75266d860
BLAKE2b-256 checksum
How to use checksums
e78352f8d7080f3432eb31b4c3991c78b939797fb36fbb2bc4e3b70198a0dffa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / scboolseq-2.3.4-py3-none-any.whl

Download URL scboolseq-2.3.4-py3-none-any.whl
Size 31.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c393e5e83bfd3d357cc49270505a4352f13e564945d814dce88ded7e3df3b16b
BLAKE2b-256 checksum
How to use checksums
68c100f6566720109de99bdd7dd750a0e6c9a48b3e83aeba4bacf56d3569ba64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

2.3.4 This release

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3

3 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page