Skip to main content

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


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.1.0.tar.gz (28.2 kB view details)

Uploaded Source

Built Distribution

scBoolSeq-2.1.0-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file scboolseq-2.1.0.tar.gz.

File metadata

  • Download URL: scboolseq-2.1.0.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for scboolseq-2.1.0.tar.gz
Algorithm Hash digest
SHA256 fe2c1c2231418d113cc8e82e54d2a2eb2cb4cc0307231d7ff7339b2b0733d1ca
MD5 ebab0a5a25819601aeb4d50a2484369d
BLAKE2b-256 1f05c18f5ccca1c6ab8a9bdbd9994486a78a8d2588a2bf356720a26eac6374dc

See more details on using hashes here.

File details

Details for the file scBoolSeq-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: scBoolSeq-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 31.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for scBoolSeq-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bba37c91dc7c98234b33ca8e0ee14b7abeaf3fb15828041535982d85948fd314
MD5 b13bf822d85604b2cb7a184ce9ae80ba
BLAKE2b-256 df230428f8b27fca1c9d3cc70c7f1fca4dbd9a4c63dca1c2301eb68ca06a34a1

See more details on using hashes here.

Supported by

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