scBoolSeq: Linking scRNA-Seq Statistics and Boolean Dynamics.
Project description
scBoolSeq
scRNA-Seq data binarisation and synthetic generation from Boolean dynamics.
Installation
We recommend installing scBoolSeq
via conda
, but we provide as well a standard pip
installation.
Conda
conda install -c conda-forge -c colomoto scboolseq
Pip
pip install scboolseq
Docker
The scBoolSeq
command can be invoked using the bnediction/scboolseq
image:
docker run --rm -it -v $PWD:/data -w /data bnediction/scboolseq scBoolSeq ...
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
scBoolSeq-2.0.tar.gz
(23.3 kB
view details)
Built Distribution
scBoolSeq-2.0-py3-none-any.whl
(25.8 kB
view details)
File details
Details for the file scBoolSeq-2.0.tar.gz
.
File metadata
- Download URL: scBoolSeq-2.0.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb937dd44446e513d40e9ca581c2f977af805e817894245b517568684d3a3460 |
|
MD5 | 13eb038bb87ab3dda1cf8800b335d88f |
|
BLAKE2b-256 | 72df449c19f2d24a16b2f7eb4650d00284f45567e120336fce87eed49f895a9c |
File details
Details for the file scBoolSeq-2.0-py3-none-any.whl
.
File metadata
- Download URL: scBoolSeq-2.0-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8d7fdf50f98e5dec611f6d64569ce0fc8fdc7d38860cab850016e9eac7f2fd0 |
|
MD5 | 1a2b7f1e8c4f3ba612e58113c60c77f7 |
|
BLAKE2b-256 | efdb4ff024032016df7347df71267dfccce5ace4ba51a65af2ba1da25a76ebb6 |