Skip to main content

To install:

git clone git@github.com:rohitsinghlab/singhlab-main.git
cd singhlab-main
pip install .

To run sceodesic with 10 different random seeds

from singhlab.utils.decorators import run_with_seed
from sceodesic import run_sceo

seeds = [123, 444, 33, 1234, 99, 14, 37]
results = {}

adata = sc.read_h5ad('adata.h5ad')

for seed in seeds:
    run_with_seed(seed)(run_sceo)(adata, num_hvgs=300)
    sceo_embeddings = adata.obsm['sceo_embeddings']
    sceo_programs = adata.varm['sceo_programs]
    results[seed] = (sceo_embeddings, sceo_programs)

To do a bootstrap for some uncertainty quantification:

from singhlab.utils.decorators import bootstrap
import numpy as np

# bootstrap parameters 
num_trials = 100
seed = 42

# the function we want to run our bootstrap on
@bootstrap(num_trials, seed)
def get_mean(data):
    return np.mean(data)
 
# Example data
data = np.array([5, 7, 8, 6, 9, 10, 12, 7, 6, 8])

# automatically applies bootstrap
boot_means = get_mean(data)

# Percentile CI (95%)
lower, upper = np.percentile(boot_means, [2.5, 97.5])

print(f"Bootstrap mean CI: [{lower:.2f}, {upper:.2f}]")

Metadata

Release files for singhlab 0.0.2

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

Source distribution (sdist)

Source distribution for singhlab 0.0.2
File Size Uploaded Provenance Actions
singhlab-0.0.2.tar.gz 10.9 kB Without provenance Details for singhlab-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for singhlab 0.0.2
File Interpreter ABI Platform Actions
singhlab-0.0.2-py3-none-any.whl Python 3 none any Details for singhlab-0.0.2-py3-none-any.whl

Total release size: 22.5 kB

Release files / singhlab-0.0.2.tar.gz

Download URL singhlab-0.0.2.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ed610e6292e39f0c0dbf98a81b1eeb037e91dd5eaaec869de840480ada9d6afd
BLAKE2b-256 checksum
How to use checksums
d137597b6198ef776531a5fc9454e9841c5edaa7b39f1eba44a0dbc089443883
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.0

Release files / singhlab-0.0.2-py3-none-any.whl

Download URL singhlab-0.0.2-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a204a326178e7c0658640fca46d463b65e04c1e574400d3f128bc1b0aa5584b8
BLAKE2b-256 checksum
How to use checksums
e37b6b0c6cd354bb82825e5f889e2d864faafe78961fa43b6e5d7316b1e53014
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.0

Security for singhlab 0.0.2

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.0.2 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