stgp 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
stgp/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # stGP: Characterizing dynamic tissue architectures by identifying cell-type-specific spatiotemporal gene programs
2
+
3
+ ## Introduction
4
+
5
+ stGP is a statistical framework for identifying interpretable cell-type-specific spatiotemporal gene programs (stGPs) from multi-sample spatiotemporal transcriptomic data measured across biological time by deciphering temporal trajectory and dynamic spatial patterns.
6
+
7
+ stGP's effectiveness relies on our innovations in the integration of Gaussian process priors and interpretable matrix factorization:
8
+
9
+ - stGP represents gene expression within each cell type as a small set of latent programs with non-negative gene loadings, making each program interpretable as a weighted gene set shared across samples. Variance components quantify the relative contributions of time and space to each program.
10
+ - stGP decomposes per-cell program activity into a sample-level temporal component that captures coordinated responses over biological time (e.g., age or stage), and a within-section spatial component that characterizes dynamic program deployment across tissue coordinates without requiring cross-section registration.
11
+ - For multi-program inference, stGP adopts a blockwise backfitting scheme that sequentially extracts rank-1 components from residuals, with automatic model selection to determine the number of programs.
12
+
13
+
14
+ ## Reference
15
+
16
+ If you find `stGP` useful for your work, please cite:
17
+ > Characterizing dynamic tissue architectures by identifying cell-type-specific spatiotemporal gene programs with stGP.
18
+ > Baichen Yu, Ziyue Tan, Xiaomeng Wan, Hansheng Wang, and Can Yang.
19
+ > Working paper, 2026.
20
+
21
+ ## Development
22
+
23
+ The software is developed and maintained by [Baichen Yu](mailto:mabyu@ust.hk).
24
+
25
+ ## Contact
26
+
27
+ Please feel free to contact [Baichen Yu](mailto:mabyu@ust.hk) or [Prof. Can Yang](mailto:macyang@ust.hk) if any inquiries.
stgp/__init__.py ADDED
@@ -0,0 +1,48 @@
1
+ from stgp.estimation import (
2
+ fit_rank1,
3
+ fit_pfactor,
4
+ fit_pfactor_auto,
5
+ project_simplex,
6
+ project_simplex_topk,
7
+ recover_low_rank_signal,
8
+ align_programs_and_mse,
9
+ )
10
+
11
+ from stgp.kernels import (
12
+ build_K_age,
13
+ build_K_spa,
14
+ build_K_spa_list,
15
+ build_K_spa_list_from_stacked,
16
+ rbf_kernel_1d,
17
+ ar1_kernel_1d,
18
+ )
19
+
20
+ from stgp.preprocessing import (
21
+ log1p_normalize,
22
+ log1p_norm_centered_list,
23
+ demean_genes,
24
+ library_normalize,
25
+ )
26
+
27
+ __version__ = "0.1.0"
28
+
29
+ __all__ = [
30
+ "__version__",
31
+ "fit_rank1",
32
+ "fit_pfactor",
33
+ "fit_pfactor_auto",
34
+ "project_simplex",
35
+ "project_simplex_topk",
36
+ "recover_low_rank_signal",
37
+ "align_programs_and_mse",
38
+ "build_K_age",
39
+ "build_K_spa",
40
+ "build_K_spa_list",
41
+ "build_K_spa_list_from_stacked",
42
+ "rbf_kernel_1d",
43
+ "ar1_kernel_1d",
44
+ "log1p_normalize",
45
+ "log1p_norm_centered_list",
46
+ "demean_genes",
47
+ "library_normalize",
48
+ ]