A stability-aware gene network inference toolkit based on partial correlation, subsampling, and module analysis.
Project description
StableGGM
StableGGM is a Python toolkit for stability-aware gene network inference from transcriptomic data. It combines preprocessing, partial-correlation estimation, subsampling-based aggregation, edge selection, network construction, module detection, plotting, and optional enrichment analysis in one package.
Project status
This repository is still in an early stage. The package structure is now ready for GitHub publication, but the scientific workflow still needs broader debugging and validation before it should be treated as production-ready.
Current capabilities
- RNA-seq and microarray preprocessing
- Partial-correlation estimation from expression matrices
- Stability selection through repeated subsampling
- Edge selection with Python-based FDR control
- Graph construction and network summaries
- MCL-based module detection
- Plotting helpers for diagnostics and network views
- Optional enrichment analysis with user-supplied annotations
Installation
Basic install:
pip install -e .
If you need ComBat batch correction support:
pip install -e ".[batch]"
Development install:
pip install -e ".[dev]"
Package layout
src/stableggm/: publishable Python packagetests/: local tests and example-driven checksexamples/: demo scripts and generated artifactsdata/: local data helpers and mapping scripts
Minimal usage
import pandas as pd
from stableggm.pipeline import run_stableggm_pipeline
expr_df = pd.read_csv("tests/data/gene_expression_Acinetobacter_baumannii.csv", index_col=0)
result = run_stableggm_pipeline(
expr_df=expr_df,
output_dir="output",
bacteria="demo",
data_type="RNA-seq",
normalization="CPM",
make_plots=False,
annotation_df=None,
)
print(result["summary"])
CLI usage
After installation, you can run the packaged command directly:
stableggm run --expr tests/data/gene_expression_Acinetobacter_baumannii.csv --output output --bacteria demo --smoke --smoke-n-genes 100 --smoke-n-samples 30 --no-make-plots
You can also run the module form:
python -m stableggm run --expr tests/data/gene_expression_Acinetobacter_baumannii.csv --output output --bacteria demo --smoke --smoke-n-genes 100 --smoke-n-samples 30 --no-make-plots
Before uploading to GitHub
- Review and trim any large generated result folders you do not want in the first commit.
- Replace placeholder metadata if you want a real author name or repository URL.
- Run a smoke test in your target Python environment.
- Create a fresh GitHub repository, then push this folder after
git init.
Known limitations
- The repository still contains historical example outputs outside the package source tree.
- Several old example scripts and tests appear to target earlier APIs and may need alignment.
- Full pipeline validation has not been completed yet on this machine.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stableggm-0.1.0.tar.gz.
File metadata
- Download URL: stableggm-0.1.0.tar.gz
- Upload date:
- Size: 50.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a14a0323df9e30bae907735edc9b88cad4aeb186616fbfa4c6c3118cad66971f
|
|
| MD5 |
2c1e9cd35259c283d4855f1559c259de
|
|
| BLAKE2b-256 |
416636f8fa73ae87d25d47e0697761d5445c09b9487d06650e68cf45cacfcd48
|
File details
Details for the file stableggm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: stableggm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 51.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ae6485178a095b74e0114dea714134e3a7ea5526b38f70cc68d6103f0405503
|
|
| MD5 |
71454922942a6432a363660195b910a3
|
|
| BLAKE2b-256 |
c4a24337840e17221c3c0ee4bdfef72df5e0abf1c6e09d5a28134ce4e9369224
|