Skip to main content

BOOTSTRAP2

Two-level hierarchical bootstrap for single-cell differential expression.

Installation

Python 3.10 or newer is required. Install with:

python -m pip install bootstrap2-sc

For installation from a local source checkout:

python -m pip install .

Input

Provide an AnnData object containing raw counts in adata.X.

adata.obs field Description
Sample Globally unique biological subject identifier
Condition Exactly two comparison groups
Batch Batch identifier; optional for a single-batch design

Each subject must belong to one condition and one batch. The method supports the nested batch--subject design, not general covariate adjustment, paired/repeated subjects or condition-batch confounding.

Python API

import anndata as ad
from bootstrap2 import bootstrap2h

adata = ad.read_h5ad("counts.h5ad")
result = bootstrap2h(
    adata,
    condition=("SLE", "Control"),
    n_bootstraps=10000,
    n_jobs=4,
    seed=0,
    lfc=0.0,
)
result.to_csv("results.tsv", sep="\t")

The input AnnData is not modified. Use layer="counts" to select a raw-count layer in the API.

Parameter Default Description
n_bootstraps 10000 Number of bootstrap iterations
n_jobs 4 Worker processes; -1 uses available CPUs
seed 0 Random seed
lfc 0 Nonnegative log2 threshold; 0 gives the point null
condition First-appearance order Numerator then denominator condition

With condition=("SLE", "Control"), a positive LFC indicates higher expression in SLE. Use condition_col, sample_col and batch_col for alternative metadata field names.

Output

Returns a DataFrame indexed by gene, with p_val and lfc columns.

Metadata

Release files for bootstrap2-sc 0.1.0

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

Source distribution (sdist)

Source distribution for bootstrap2-sc 0.1.0
File Size Uploaded Provenance Actions
bootstrap2_sc-0.1.0.tar.gz 5.3 kB Without provenance Details for bootstrap2_sc-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bootstrap2-sc 0.1.0
File Interpreter ABI Platform Actions
bootstrap2_sc-0.1.0-py3-none-any.whl Python 3 none any Details for bootstrap2_sc-0.1.0-py3-none-any.whl

Total release size: 10.8 kB

Release files / bootstrap2_sc-0.1.0.tar.gz

Download URL bootstrap2_sc-0.1.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c67d9a4282f286425ebcb3863bf550ac086e67c15e0d715c09b2a6c8c2847834
BLAKE2b-256 checksum
How to use checksums
ad51f12294c832840daed67a6ba349b801b96eb07c4a1a092499ee8b52261bba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bootstrap2_sc-0.1.0-py3-none-any.whl

Download URL bootstrap2_sc-0.1.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cdc9408f1167ca625a24ed1a1047717889a7663c07d63f60f2a287af665ae5a3
BLAKE2b-256 checksum
How to use checksums
46fcc00c00f2a3ac809f06faa34b7802011427d410a767e50193663ed7b212f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Security for bootstrap2-sc 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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