multineuronchat 2025.11.10.dev0__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.
@@ -0,0 +1,117 @@
1
+ Metadata-Version: 2.4
2
+ Name: multineuronchat
3
+ Version: 2025.11.10.dev0
4
+ Summary: MultiNeuronChat is a Python library for inferring condition‑related changes in synaptic cell‑cell communication from scRNA-/snRNA-Seq datasets in case vs control study designs.
5
+ Author-email: Gianluca Volkmer <gianluca.volkmer@ki.se>
6
+ License-Expression: GPL-3.0
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: numpy==1.26.4
11
+ Requires-Dist: pandas==2.3.1
12
+ Requires-Dist: xarray==2025.7.1
13
+ Requires-Dist: dask==2025.7.0
14
+ Requires-Dist: netCDF4==1.7.2
15
+ Requires-Dist: bottleneck==1.5.0
16
+ Requires-Dist: scipy==1.16.1
17
+ Requires-Dist: matplotlib==3.10.5
18
+ Requires-Dist: seaborn==0.13.2
19
+ Requires-Dist: tqdm==4.67.1
20
+ Requires-Dist: loompy==3.0.8
21
+ Dynamic: license-file
22
+
23
+ # MultiNeuronChat
24
+
25
+ **MultiNeuronChat** is a Python library for inferring *condition‑related changes* in synaptic cell‑cell communication from single‑cell / single‑nucleus RNA‑seq (sc/snRNA‑seq) datasets in **case vs control** study designs.
26
+ It builds on the mathematical model of [Zhao _et al._ 2023](https://www.nature.com/articles/s41467-023-36800-w) method [NeuronChat](https://github.com/Wei-BioMath/NeuronChat) and extends it to multi‑condition comparisons with subject‑level statistics.
27
+
28
+ ---
29
+ ## Installation
30
+
31
+ From PyPI:
32
+
33
+ ```bash
34
+ pip install multineuronchat
35
+ ```
36
+
37
+ > Python ≥ 3.9 is recommended.
38
+ ---
39
+
40
+ ## Quick start (minimal end-to-end)
41
+
42
+ MultiNeuronChat expects a **cell-wise log-normalized** gene expression matrix in [**Loom**](https://linnarssonlab.org/loompy/) format. You can either normalize your matrix manually or use the provided implementation:
43
+
44
+ ```python
45
+ from multineuronchat.normalize import cell_wise_log_normalization
46
+
47
+ cell_wise_log_normalization(
48
+ # Path to the input Loom file
49
+ path_to_loom="path/to/data.loom",
50
+ # Path to the cell-wise log-normalized output Loom file
51
+ path_to_normalized_loom='path/to/cellwise_normalized_data.loom',
52
+ # Whether to print computational progress
53
+ verbose=True
54
+ )
55
+ ```
56
+
57
+ This log-normalized loom file can then be used to run MultiNeuronChat:
58
+
59
+ ```python
60
+ from multineuronchat.MultiNeuronChatObject import MultiNeuronChatObject
61
+
62
+ # 1) Configure your analysis
63
+ mnc = MultiNeuronChatObject(
64
+ condition_label_column="condition", # column attribute in Loom
65
+ condition_names=("control", "case"), # order matters
66
+ subject_label_column="subject", # column attribute in Loom
67
+ cell_type_label_column="cell_types", # column attribute in Loom
68
+ db="human_extended" # "human", "mouse", "human_extended", or path to custom DB
69
+ )
70
+
71
+ # 2) Compute communication scores
72
+ mnc.compute_communication_scores(
73
+ # Path to the cell-wise log-normalized Loom file
74
+ path_to_data_loom="path/to/cellwise_normalized_data.loom",
75
+ # The row name of the gene attribute in the Loom file
76
+ gene_label_row='gene',
77
+ # The number of processes to use for the parallel computations of communication scores
78
+ n_processes=4,
79
+ # The minimum number of cells of a specific cell type within a specific subject to include in the analysis
80
+ min_n_cells_threshold=20,
81
+ # Whether to print computational progress
82
+ verbose=True
83
+ )
84
+
85
+ # 3) (Optional) Focus hypotheses with masks (Wasserstein / EMD)
86
+ from multineuronchat.masks import compute_wasserstein_mask
87
+ mask = compute_wasserstein_mask(mnc, top_percentile=99.0)
88
+
89
+ # 4) Significance testing and multiple testing correction
90
+ pvals = mnc.compute_significance(
91
+ # The statistical test to use when comparing the communication score distributions between conditions
92
+ statistical_test='KS',
93
+ # Optional mask to focus the significance testing on specific interactions. If None, all interactions are tested.
94
+ mask=mask,
95
+ # The number of resamples to use for permutation testing when appropriate
96
+ n_resamples=10_000,
97
+ # The random state for reproducibility
98
+ random_state=42
99
+ )
100
+
101
+ # 5) Control FDR (Benjamini–Yekutieli by default; use "bh" for Benjamini–Hochberg)
102
+ pvals_adj = mnc.correct_p_values(statistical_test="KS", method="by")
103
+ ```
104
+
105
+
106
+ ## Input data requirements
107
+
108
+ For MultiNeuronChat to function, your input Loom file must meet the following criteria:
109
+
110
+ - **Row attributes**:
111
+ - genes that were measured (`gene`)
112
+ - **Column attributes**:
113
+ - labels assigning a subject to each cell (`subject` in the example above but can be configured)
114
+ - condition labels (`condition` in the example above but can be configured)
115
+ - cell type labels (`cell_types` in the example above but can be configured)
116
+
117
+ > Gene symbols should match the selected interaction database (human, mouse, or your custom DB).
@@ -0,0 +1,17 @@
1
+ multineuronchat/MultiNeuronChat.py,sha256=g7PzKc5vUJ_d1DGB7shvtWnDr0qHRuDXgd18Ak8rp3o,22060
2
+ multineuronchat/MultiNeuronChatObject.py,sha256=CGHAnrQjgN3PorHAoYETECLKfUc_WmASwLkCqGrPXq0,44249
3
+ multineuronchat/__init__.py,sha256=ihvIlS6qRzlnCQVShuprmcgc64evOHr_VfOV-ify6go,921
4
+ multineuronchat/loompy_utils.py,sha256=03yMriq5lsLWv3eO4a0RjuH8OguB6ScYaOc7qZzDgJ8,2040
5
+ multineuronchat/masks.py,sha256=cQ5vnTKQCOfRDGx2yQEmhjqA-hUhDFyw75WpWeK1GlE,16094
6
+ multineuronchat/normalize.py,sha256=vhIe7ToV2B6VEoquhI5GcLOJlRG5gxOL2rMEvBG4j6Y,8021
7
+ multineuronchat/utils.py,sha256=_qtkBe_MYEsrzs-YRF22YJhpG7P4orcd0G3WvAIRoDo,7165
8
+ multineuronchat/visualize.py,sha256=I_rw12vLpXxlOZEfIqM4u3_drFPA7_-UGiLOaxYMJv8,50580
9
+ multineuronchat/InteractionDB/InteractionDB.py,sha256=aLIdDSpnMsfc3JXBV1s8scX0Nf1y2vIj5IomtnrOlZY,2471
10
+ multineuronchat/InteractionDB/InteractionDBRow.py,sha256=Hz9rRVvIpe_2mXO_wvyHgqqVQHWV5sYldG4ybr-T4fk,2362
11
+ multineuronchat/InteractionDB/__init__.py,sha256=a8-Im1T8JaiOQx3j2qGR3_UtrJNXzSUnIDS_9JRyJbg,136
12
+ multineuronchat/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ multineuronchat-2025.11.10.dev0.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
14
+ multineuronchat-2025.11.10.dev0.dist-info/METADATA,sha256=ovYdX7S86hTm0huI2hdRy1QEiX_5vKcXurBr-Qx1JtE,4677
15
+ multineuronchat-2025.11.10.dev0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
+ multineuronchat-2025.11.10.dev0.dist-info/top_level.txt,sha256=zXASYdKr9U41vEJXPXkkMuM3rqLYbIoezoCOfO0Si6Q,16
17
+ multineuronchat-2025.11.10.dev0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+