scBoolSeq: Linking scRNA-Seq Statistics and Boolean Dynamics.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scboolseq-2.3.2.tar.gz.
File metadata
- Download URL: scboolseq-2.3.2.tar.gz
- Upload date:
- Size: 28.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
394574def4cf971591dd5bd6de2be5bfc47ab843ef5d472c0bbeab8a971bc839
|
|
| MD5 |
d4fdfbfd83d67376042b415f03c5c42d
|
|
| BLAKE2b-256 |
6e02db1abf8e6a94ad5b83153fe35ff986daced9189171d7433fe0a6c2c72029
|
File details
Details for the file scboolseq-2.3.2-py3-none-any.whl.
File metadata
- Download URL: scboolseq-2.3.2-py3-none-any.whl
- Upload date:
- Size: 31.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf6a0380605b840fa70feffc39557df7f4def4474b485ea4da0148fcff20d09e
|
|
| MD5 |
90eb74e6f159d5fc6da032e2fcd1af7c
|
|
| BLAKE2b-256 |
f673caf57d3e40e9e1c92de52b3aea5b8654f350a5fa0bcabcd0142b18708096
|