BoNesisTools provides Python-implemented toolkits for upstream and downstream analyses around the BoNesis ecosystem.
The package provides:
- Boolean algebra and partial Boolean abstractions
- Boolean network manipulation and analysis
- signed influence graph utilities
- GRN-informed Boolean predecessor inference
- single-cell and multimodal analysis helpers
- biological database interfaces
import bonesistools as btBoNesisTools exposes four main namespaces:
bt.sct— single-cell and multimodal annotated data toolsbt.bpy— Boolean modelling and graph utilitiesbt.dbs— biological database interfaces
bt.sct is inspired by Scanpy while providing additional and complementary features for single-cell analyses.
Submodules:
-
preprocessing:
bt.sct.pp- expression transformations, feature selection, filtering and metadata utilities
-
tools:
bt.sct.tl- embeddings, neighborhood graphs, clustering, differential analysis and matrix utilities
-
plotting:
bt.sct.pl- visualization helpers for embeddings, trajectories, distributions and summaries
-
datasets:
bt.sct.datasets- registered single-cell example datasets loaded with
bt.sct.datasets.load(...)
- registered single-cell example datasets loaded with
Example:
bt.sct.datasets.available()
bt.sct.datasets.info("pbmc3k")
adata = bt.sct.datasets.load("pbmc3k")
adata = bt.sct.datasets.load("nestorowa")
bt.sct.datasets.clear("pbmc3k")bt.bpy provides utilities for Boolean modelling, logical abstractions and signed regulatory graphs.
Submodules:
-
Boolean algebra:
bt.bpy.ba- logical objects and transformations for Boolean-state reasoning
-
Boolean network:
bt.bpy.bn- Boolean model representation, conversion, analysis and exchange
-
influence graph:
bt.bpy.ig- signed regulatory graph construction, comparison, analysis and display
Example:
bn = bt.bpy.bn.BooleanNetwork(
{
"A": "B & ~C",
"B": 1,
"C": 0,
}
)
graph = bn.to_influence_graph()
graph.show()bt.dbs provides lightweight interfaces and utilities for biological
external resources.
Submodules:
-
NCBI:
bt.dbs.ncbi- gene identifier, synonym and annotation utilities
-
OmniPath:
bt.dbs.omnipath- regulatory interaction datasets
-
HCOP:
bt.dbs.hcop- orthology resources
Example:
genesyn = bt.dbs.ncbi.genesyn()
grn = bt.dbs.omnipath.collectri(
organism="mouse",
genesyn=genesyn,
)Install the latest release:
pip install bonesistoolsInstall the omics dependencies:
pip install "bonesistools[omics]"Install all optional dependencies:
pip install "bonesistools[all]"Install the development version:
git clone https://github.com/bnediction/bonesistools.git
cd bonesistools
pip install -e ".[all]"or directly:
pip install git+https://github.com/bnediction/bonesistools.gitPlease report bugs or ask questions here:
https://github.com/bnediction/bonesistools/issues
This package is distributed under the CeCILL v2.1 free software license (GNU GPL compatible).
This package also includes third-party data resources derived from the
NCBI Gene database (gene_info). NCBI places no restrictions on the
use or redistribution of these data: https://www.ncbi.nlm.nih.gov/home/about/policies/