xstars 1.3.1__tar.gz
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.
- xstars-1.3.1/LICENSE +21 -0
- xstars-1.3.1/MANIFEST.in +14 -0
- xstars-1.3.1/PKG-INFO +99 -0
- xstars-1.3.1/README.md +284 -0
- xstars-1.3.1/README.pypi.md +55 -0
- xstars-1.3.1/README.zh-CN.md +283 -0
- xstars-1.3.1/pyproject.toml +78 -0
- xstars-1.3.1/setup.cfg +4 -0
- xstars-1.3.1/tests/__init__.py +0 -0
- xstars-1.3.1/tests/conftest.py +74 -0
- xstars-1.3.1/tests/test_application_analysis.py +838 -0
- xstars-1.3.1/tests/test_application_contracts.py +215 -0
- xstars-1.3.1/tests/test_artifacts.py +503 -0
- xstars-1.3.1/tests/test_canvas_layout.py +465 -0
- xstars-1.3.1/tests/test_config_persistence.py +92 -0
- xstars-1.3.1/tests/test_core_imports.py +104 -0
- xstars-1.3.1/tests/test_data_handler.py +67 -0
- xstars-1.3.1/tests/test_elisa.py +236 -0
- xstars-1.3.1/tests/test_end_to_end.py +154 -0
- xstars-1.3.1/tests/test_excel_characterization.py +523 -0
- xstars-1.3.1/tests/test_export_and_summary.py +62 -0
- xstars-1.3.1/tests/test_macos_installer.py +1473 -0
- xstars-1.3.1/tests/test_macos_support.py +1398 -0
- xstars-1.3.1/tests/test_plot_engine.py +304 -0
- xstars-1.3.1/tests/test_presets.py +900 -0
- xstars-1.3.1/tests/test_release_version.py +68 -0
- xstars-1.3.1/tests/test_standard_curve.py +262 -0
- xstars-1.3.1/tests/test_stats_engine.py +157 -0
- xstars-1.3.1/tests/test_ui_dialog_selection.py +302 -0
- xstars-1.3.1/tests/test_wps_export.py +387 -0
- xstars-1.3.1/tests/test_wps_installer.py +29 -0
- xstars-1.3.1/tests/test_wps_probe.py +351 -0
- xstars-1.3.1/tests/test_wps_service.py +1388 -0
- xstars-1.3.1/tests/test_wps_worker.py +453 -0
- xstars-1.3.1/xstars/__init__.py +3 -0
- xstars-1.3.1/xstars/annotations.py +251 -0
- xstars-1.3.1/xstars/application/__init__.py +43 -0
- xstars-1.3.1/xstars/application/analysis.py +941 -0
- xstars-1.3.1/xstars/application/contracts.py +510 -0
- xstars-1.3.1/xstars/application/export.py +373 -0
- xstars-1.3.1/xstars/application/worker.py +929 -0
- xstars-1.3.1/xstars/artifacts.py +931 -0
- xstars-1.3.1/xstars/cli.py +70 -0
- xstars-1.3.1/xstars/config.py +307 -0
- xstars-1.3.1/xstars/data_handler.py +172 -0
- xstars-1.3.1/xstars/main.py +2149 -0
- xstars-1.3.1/xstars/plot_engine.py +765 -0
- xstars-1.3.1/xstars/presets/__init__.py +71 -0
- xstars-1.3.1/xstars/presets/cck8.py +226 -0
- xstars-1.3.1/xstars/presets/elisa.py +75 -0
- xstars-1.3.1/xstars/presets/elisa_dialog.py +701 -0
- xstars-1.3.1/xstars/presets/qpcr.py +199 -0
- xstars-1.3.1/xstars/presets/wb.py +154 -0
- xstars-1.3.1/xstars/stats_engine.py +326 -0
- xstars-1.3.1/xstars/styles.py +392 -0
- xstars-1.3.1/xstars/tools/__init__.py +0 -0
- xstars-1.3.1/xstars/tools/standard_curve.py +452 -0
- xstars-1.3.1/xstars/tools/standard_curve_dialog.py +213 -0
- xstars-1.3.1/xstars/ui_dialog.py +1444 -0
- xstars-1.3.1/xstars/wps_service.py +935 -0
- xstars-1.3.1/xstars.egg-info/PKG-INFO +99 -0
- xstars-1.3.1/xstars.egg-info/SOURCES.txt +63 -0
- xstars-1.3.1/xstars.egg-info/dependency_links.txt +1 -0
- xstars-1.3.1/xstars.egg-info/requires.txt +18 -0
- xstars-1.3.1/xstars.egg-info/top_level.txt +1 -0
xstars-1.3.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 @Frankkk1912 (GitHub)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
xstars-1.3.1/MANIFEST.in
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
include LICENSE
|
|
2
|
+
include README.pypi.md
|
|
3
|
+
include README.md
|
|
4
|
+
include README.zh-CN.md
|
|
5
|
+
include pyproject.toml
|
|
6
|
+
recursive-include xstars *.py
|
|
7
|
+
recursive-include tests *.py
|
|
8
|
+
|
|
9
|
+
global-exclude *.xlam *.xlsm *.xlsx *.xls *.gif *.exe *.pkg
|
|
10
|
+
prune installer
|
|
11
|
+
prune assets
|
|
12
|
+
prune ribbon
|
|
13
|
+
prune wps-addon
|
|
14
|
+
prune poc
|
xstars-1.3.1/PKG-INFO
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: xstars
|
|
3
|
+
Version: 1.3.1
|
|
4
|
+
Summary: Excel and WPS wet-lab statistics and figures for Western blot (WB), qPCR, CCK-8, and ELISA. Not the astronomy XSTAR code.
|
|
5
|
+
Author: Yuxing Dai (@Frankkk1912)
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Frankkk1912/xstars
|
|
8
|
+
Project-URL: Source, https://github.com/Frankkk1912/xstars
|
|
9
|
+
Project-URL: Issues, https://github.com/Frankkk1912/xstars/issues
|
|
10
|
+
Project-URL: Releases, https://github.com/Frankkk1912/xstars/releases
|
|
11
|
+
Keywords: excel,wps,statistics,western-blot,qpcr,cck-8,elisa,wet-lab,scientific-figure
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Natural Language :: Chinese (Simplified)
|
|
15
|
+
Classifier: Natural Language :: English
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: pandas>=2.0
|
|
28
|
+
Requires-Dist: numpy>=1.24
|
|
29
|
+
Requires-Dist: scipy>=1.11
|
|
30
|
+
Requires-Dist: scikit-posthocs>=0.9
|
|
31
|
+
Requires-Dist: matplotlib>=3.7
|
|
32
|
+
Requires-Dist: seaborn>=0.13
|
|
33
|
+
Requires-Dist: Pillow>=10.0
|
|
34
|
+
Provides-Extra: excel
|
|
35
|
+
Requires-Dist: xlwings>=0.33.0; extra == "excel"
|
|
36
|
+
Requires-Dist: ttkbootstrap>=1.10; extra == "excel"
|
|
37
|
+
Provides-Extra: dev
|
|
38
|
+
Requires-Dist: xstars[excel]; extra == "dev"
|
|
39
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
40
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
41
|
+
Requires-Dist: oletools>=0.60; extra == "dev"
|
|
42
|
+
Requires-Dist: defusedxml>=0.7; extra == "dev"
|
|
43
|
+
Dynamic: license-file
|
|
44
|
+
|
|
45
|
+
# XSTARS
|
|
46
|
+
|
|
47
|
+
Excel and WPS statistics and publication figures for wet-lab assays: Western blot (WB), qPCR, CCK-8, and ELISA. XSTARS picks a statistical test, draws significance brackets, and saves a journal-style figure.
|
|
48
|
+
|
|
49
|
+
This is not the astronomy code [XSTAR](https://heasarc.gsfc.nasa.gov/xstar/xstar.html).
|
|
50
|
+
|
|
51
|
+
Most people should not install from PyPI. Download the Windows, macOS, or WPS installer from [GitHub Releases](https://github.com/Frankkk1912/xstars/releases). Those packages bundle Python and the spreadsheet add-in. No separate Python environment is required.
|
|
52
|
+
|
|
53
|
+
## Install from PyPI
|
|
54
|
+
|
|
55
|
+
Python users who want the statistics and plotting engine:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install xstars
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
That install is pandas, numpy, scipy, scikit-posthocs, matplotlib, seaborn, and Pillow. It does not install Excel or the settings dialogs.
|
|
62
|
+
|
|
63
|
+
The Excel/WPS UI (xlwings and ttkbootstrap) is an optional extra:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install "xstars[excel]"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`xstars[excel]` is for Windows and macOS spreadsheet hosts. The core package imports without xlwings, ttkbootstrap, or tkinter.
|
|
70
|
+
|
|
71
|
+
## Example
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
import pandas as pd
|
|
75
|
+
|
|
76
|
+
from xstars.application.analysis import analyze_dataframe
|
|
77
|
+
from xstars.config import PrismConfig
|
|
78
|
+
from xstars.plot_engine import PlotEngine
|
|
79
|
+
|
|
80
|
+
df = pd.DataFrame(
|
|
81
|
+
{
|
|
82
|
+
"Control": [1.1, 1.2, 1.0, 1.3, 1.15, 1.25],
|
|
83
|
+
"Treatment": [2.1, 2.4, 1.9, 2.2, 2.0, 2.3],
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
config = PrismConfig(title="Treatment vs control", y_label="Signal")
|
|
87
|
+
result = analyze_dataframe(df, config)
|
|
88
|
+
figure = PlotEngine(config).plot(result.transformed_data, result.stats_result)
|
|
89
|
+
figure.savefig("xstars_figure.png", dpi=200)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`analyze_dataframe` runs the shared transform, statistics, and plot pipeline. `PlotEngine` draws the figure that this example writes to `xstars_figure.png`.
|
|
93
|
+
|
|
94
|
+
## Links
|
|
95
|
+
|
|
96
|
+
- Source and full documentation: https://github.com/Frankkk1912/xstars
|
|
97
|
+
- 中文文档: https://github.com/Frankkk1912/xstars/blob/main/README.zh-CN.md
|
|
98
|
+
- Installers: https://github.com/Frankkk1912/xstars/releases
|
|
99
|
+
- Issues: https://github.com/Frankkk1912/xstars/issues
|
xstars-1.3.1/README.md
ADDED
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
<h1 align="center">✨ XSTARS</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>Excel-based Statistics Tool for Analysis, Rapid Significance - in one click</strong><br>
|
|
5
|
+
<em>See the stars in your data.</em>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
🔄 Zero switching · 🧠 Zero barrier · 💰 Zero cost
|
|
10
|
+
</p>
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://github.com/Frankkk1912/xstars/releases">📥 Download Installer</a> ·
|
|
13
|
+
<a href="README.zh-CN.md">🇨🇳 中文文档</a> ·
|
|
14
|
+
<a href="#-quick-start">🚀 Quick Start</a> ·
|
|
15
|
+
<a href="https://youtu.be/RYQnUziHH7Q?si=7PG5P3-cC38gZ2YY"> 📺 Demo Video</a> ·
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 🤔 Why XSTARS?
|
|
21
|
+
|
|
22
|
+
> 🎓 Your lab meeting is tomorrow. You just finished a Western blot and the band intensities are in Excel. Now you need to: open Prism, paste the data, pick the right statistical test, tweak the figure style, export it, paste it into your slides… An hour later, you've spent more time on the figure than on the experiment itself.
|
|
23
|
+
>
|
|
24
|
+
> **What if all of that took just one click — right inside Excel?**
|
|
25
|
+
|
|
26
|
+
**XSTARS** is a free Excel add-in that generates publication-quality charts with automatic statistical testing — directly inside your spreadsheet. No new software to learn, no data to export, no code to write.
|
|
27
|
+
|
|
28
|
+
### 😩 The Problem
|
|
29
|
+
|
|
30
|
+
| Pain point | Before XSTARS |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| 🔀 Tool switching | Copy data from Excel → paste into Prism/R → make figure → paste back into manuscript |
|
|
33
|
+
| 🤯 Choosing statistics | "Should I use t-test or Mann-Whitney?" — manually check normality, decide, hope it's right |
|
|
34
|
+
| 💸 Cost | GraphPad Prism: ~$300/year (student), ~$600+ (academic). Or use a pirated copy and worry |
|
|
35
|
+
| 📚 Learning curve | R/Python: weeks of learning. Prism: a new interface to master |
|
|
36
|
+
|
|
37
|
+
### 💡 The Solution — Three Zeros
|
|
38
|
+
|
|
39
|
+
| | What it means |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| 🔄 **Zero Switching** | Select data in Excel → click → figure appears in Excel. Your data never leaves |
|
|
42
|
+
| 🧠 **Zero Barrier** | Auto-detects normality & variance → picks the right test → draws significance brackets. You don't choose |
|
|
43
|
+
| 💰 **Zero Cost** | Free and open-source. One installer, no Python required, no license fees |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 🎬 Demo
|
|
48
|
+
|
|
49
|
+
### ⚡ Quick Run — One click, instant figure
|
|
50
|
+
|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## ⚔️ XSTARS vs. Alternatives
|
|
56
|
+
|
|
57
|
+
| | XSTARS | GraphPad Prism | R / Python |
|
|
58
|
+
| --- | :---: | :---: | :---: |
|
|
59
|
+
| **💰 Price** | 🟢 Free | 🔴 ~$300–600/yr | 🟢 Free |
|
|
60
|
+
| **📊 Works inside Excel** | ✅ | ❌ | ❌ |
|
|
61
|
+
| **🖱️ No coding required** | ✅ | ✅ | ❌ |
|
|
62
|
+
| **📦 No Python/R install** | ✅ (standalone installer: `.exe` / `.pkg`) | N/A | ❌ |
|
|
63
|
+
| **🤖 Auto stat test selection** | ✅ | ❌ Manual | ❌ Manual |
|
|
64
|
+
| **📐 Significance brackets** | ✅ Automatic | ⚠️ Manual placement | ❌ Code required |
|
|
65
|
+
| **🧪 Experiment presets** | ✅ WB, qPCR, CCK-8, ELISA | ❌ | ❌ Build your own |
|
|
66
|
+
| **🎨 Journal-matched themes** | ✅ 1,500+ style combinations | ⚠️ Limited | ❌ Code required |
|
|
67
|
+
| **⏱️ Learning time** | 🟢 Minutes | 🟡 Hours | 🔴 Weeks |
|
|
68
|
+
|
|
69
|
+
> 💬 XSTARS is not trying to replace Prism for every use case. It focuses on the **most common lab scenario**: you finished an experiment, your data is in Excel, and you need a publication-quality figure with correct statistics — fast.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 🧰 Features
|
|
74
|
+
|
|
75
|
+
### 📊 Chart Types
|
|
76
|
+
|
|
77
|
+
- **Bar + Scatter** — Mean bars with error bars (SEM / SD / 95% CI) and individual data points
|
|
78
|
+
- **Violin** — Distribution shape with optional scatter overlay
|
|
79
|
+
- **Line** — Group means connected by lines
|
|
80
|
+
|
|
81
|
+
### 🤖 Automatic Statistical Testing
|
|
82
|
+
|
|
83
|
+
No more guessing which test to use. XSTARS runs a decision tree on your data:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
For each group: Shapiro-Wilk normality test
|
|
87
|
+
↓
|
|
88
|
+
Across groups: Levene's test for equal variance
|
|
89
|
+
↓
|
|
90
|
+
Auto-select the appropriate test:
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
| Condition | 2 Groups | ≥ 3 Groups |
|
|
94
|
+
| ----------- | ---------- | ------------ |
|
|
95
|
+
| Normal + Equal variance | t-test | ANOVA + Tukey HSD |
|
|
96
|
+
| Normal + Unequal variance | Welch's t-test | Welch's ANOVA + Games-Howell |
|
|
97
|
+
| Non-normal | Mann–Whitney U | Kruskal–Wallis + Dunn |
|
|
98
|
+
| Paired (normal) | Paired t-test | — |
|
|
99
|
+
| Paired (non-normal) | Wilcoxon signed-rank | — |
|
|
100
|
+
|
|
101
|
+
Significance brackets (`*`, `**`, `***`, `****`, or exact p-values) are drawn automatically. ✨
|
|
102
|
+
|
|
103
|
+
**Canvas size:** In Run Analysis → Figure, choose:
|
|
104
|
+
|
|
105
|
+
- **Fixed size** (default): the configured width and height, or the journal preset's.
|
|
106
|
+
- **Panel (width by groups):** every plot gets the same height and the same width per group (Narrow 0.5 in / Medium 0.7 in / Wide 0.9 in), so plots line up when you assemble a multi-panel figure at 100% scale.
|
|
107
|
+
|
|
108
|
+
**Y-axis:**
|
|
109
|
+
|
|
110
|
+
- **Fit brackets** (default): the y-axis extends up through the significance brackets to the next round tick. The image keeps its size; with many comparisons the bars get shorter.
|
|
111
|
+
- **Fit data (brackets above):** the y-axis is scaled so the tallest value fills about 80% of it (e.g. a maximum of 8 gives an axis to 10). Brackets start just above the data and may continue above the axis; the image grows taller instead of the bars getting shorter.
|
|
112
|
+
|
|
113
|
+
**Choose brackets…** (under Comparison Mode) lets you untick individual comparisons. Like *Show "ns" labels*, this only hides brackets: p-values, multiple-comparison correction and the statistics table still include every comparison. The choice is kept with each figure but not saved as a global default, because group names change between datasets.
|
|
114
|
+
|
|
115
|
+
Brackets are stacked compactly: shorter comparisons sit lower, and comparisons that don't overlap share a row. Every selected comparison is always drawn. With many comparisons XSTARS shows a notice suggesting a taller figure, hiding `ns`, or comparing against a control. Hiding `ns` changes display only, not p-values or multiple-comparison correction. Exports keep the full canvas instead of tightly cropping it.
|
|
116
|
+
|
|
117
|
+
> ⚠️ **Small samples (N < 5):** Normality tests are unreliable at very small N — XSTARS skips the test and assumes normality.
|
|
118
|
+
|
|
119
|
+
### 🧪 Experiment Presets
|
|
120
|
+
|
|
121
|
+
Built-in workflows for common lab assays — no manual calculation needed:
|
|
122
|
+
|
|
123
|
+
🔬 **Western Blot**
|
|
124
|
+
|
|
125
|
+
- Normalize band intensities → fold change
|
|
126
|
+
- Reference protein correction (e.g., GAPDH) per lane
|
|
127
|
+
- Multi-target labeled mode: one figure per protein, automatic reference normalization
|
|
128
|
+
|
|
129
|
+
🧬 **qPCR (ΔΔCt)**
|
|
130
|
+
|
|
131
|
+
- Accepts ΔCt or raw Ct input
|
|
132
|
+
- Automatic ΔΔCt → 2^(−ΔΔCt) fold change calculation
|
|
133
|
+
- Multi-gene labeled mode with reference gene normalization
|
|
134
|
+
|
|
135
|
+
💊 **CCK-8 Cell Viability**
|
|
136
|
+
|
|
137
|
+
- Blank subtraction → viability %
|
|
138
|
+
- Optional IC50 fitting (4-parameter logistic curve)
|
|
139
|
+
- Dose-response curve with flexible axis scaling
|
|
140
|
+
|
|
141
|
+
🧫 **ELISA**
|
|
142
|
+
|
|
143
|
+
- Standard curve fitting (4PL/linear)
|
|
144
|
+
- Sample concentration back-calculation
|
|
145
|
+
- Supports manual parameter input for existing curves
|
|
146
|
+
|
|
147
|
+
### 🔬 Western Blot — Band quantification to fold change
|
|
148
|
+
|
|
149
|
+

|
|
150
|
+
|
|
151
|
+
### 🧫 ELISA — Standard curve fitting & concentration back-calculation
|
|
152
|
+
|
|
153
|
+

|
|
154
|
+
|
|
155
|
+
### 🎨 Journal-Ready Theme System
|
|
156
|
+
|
|
157
|
+
Four independent controls — **1,500+ style combinations** to match any journal, any aesthetic:
|
|
158
|
+
|
|
159
|
+
| Control | Options |
|
|
160
|
+
| --------- | --------- |
|
|
161
|
+
| **🖌️ Base Theme** | Classic · B&W · Minimal · Dark |
|
|
162
|
+
| **📐 Layout** | Journal typography presets — Nature · Science · Cell · Lancet · NEJM · JAMA · BMJ (figure width, font, size) |
|
|
163
|
+
| **🎨 Palette** | Journal-inspired color palettes (ggsci-style) |
|
|
164
|
+
| **💧 Color Style** | Pastel · Deep · Vibrant · Muted · Colorblind-safe |
|
|
165
|
+
|
|
166
|
+
1,500+ figure styles — Mix Base Theme × Layout × Palette × Color Style to match any journal, any aesthetic, any preference.
|
|
167
|
+
|
|
168
|
+
### 📤 Export
|
|
169
|
+
|
|
170
|
+
Save figures as **PNG**, **TIFF**, **SVG**, or **PDF** — with custom DPI up to 1200, ready for submission. 🎯
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 🚀 Quick Start
|
|
175
|
+
|
|
176
|
+
### Option A: 📥 Installer (Recommended — no Python needed)
|
|
177
|
+
|
|
178
|
+
1. Download `XSTARS_Setup.exe` from [Releases](https://github.com/Frankkk1912/xstars/releases)
|
|
179
|
+
2. Run the installer — it sets up the Excel add-in automatically
|
|
180
|
+
3. Open Excel → you'll see the **XSTARS** tab in the ribbon
|
|
181
|
+
4. Select your data (with headers) → click **Run** 🎉
|
|
182
|
+
|
|
183
|
+
> 💡 **New to XSTARS?** Open `XSTARS_Templates.xlsx` (included in the installer) for ready-to-run example datasets covering every chart type and experiment preset — just click Run on any sheet to see XSTARS in action.
|
|
184
|
+
|
|
185
|
+
### Option B: 📑 WPS Office Support (Windows)
|
|
186
|
+
|
|
187
|
+
XSTARS provides a standalone distribution for **Kingsoft WPS Spreadsheet**:
|
|
188
|
+
|
|
189
|
+
- **Official Support**: WPS 365 / 12.x 64-bit (Professional, Commercial, Enterprise, and Education editions).
|
|
190
|
+
- **Personal Edition**: Supported as Beta preview.
|
|
191
|
+
- **Offline & Secure**: Runs entirely on local loopback (`127.0.0.1`) without external network dependencies.
|
|
192
|
+
- See the [WPS Installation & User Guide](docs/wps-installation.md) for full setup instructions (`XSTARS_WPS_Setup.exe`).
|
|
193
|
+
|
|
194
|
+
### macOS: 📦 Installer (Recommended — no Python needed)
|
|
195
|
+
|
|
196
|
+
On an Apple Silicon Mac, download `XSTARS_MacOS_Setup_v1.2.1.pkg`, double-click it, and follow Installer. The per-user package includes Python 3.12, all dependencies, the Excel startup add-in, and the xlwings bridge—there is no Python environment or manual VBA import to prepare. See the [macOS Installer Guide](docs/macos-installer.md) for requirements, unsigned-package release options, and uninstall instructions. WPS for Mac is not supported.
|
|
197
|
+
|
|
198
|
+
#### macOS Developer Mode (source-debugging fallback)
|
|
199
|
+
|
|
200
|
+
For source development or debugging, the existing Python 3.10+ virtual-environment and RunPython workflow remains available. Follow the complete setup, permissions, and Ribbon reconstruction steps in the [macOS Developer-Mode Guide](docs/macos-developer-setup.md).
|
|
201
|
+
|
|
202
|
+
### Option C: 🛠️ Developer Setup (Python required)
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
git clone https://github.com/Frankkk1912/xstars.git
|
|
206
|
+
cd xstars
|
|
207
|
+
pip install -e ".[dev]"
|
|
208
|
+
xlwings addin install
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
`pip install -e ".[dev]"` includes the `excel` extra (xlwings and ttkbootstrap), pytest, and the installer test tools. Then open your `.xlsm` workbook and add the VBA callbacks — see [ribbon/README.md](ribbon/README.md).
|
|
212
|
+
|
|
213
|
+
### Install from PyPI (Python users)
|
|
214
|
+
|
|
215
|
+
The installers on [GitHub Releases](https://github.com/Frankkk1912/xstars/releases) are what almost everyone should use. They bundle Python and the spreadsheet add-in. Install from PyPI only when you want the statistics and plotting engine in your own Python environment:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
pip install xstars
|
|
219
|
+
pip install "xstars[excel]"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
`xstars` installs the stats and figure stack only. `xstars[excel]` adds xlwings and ttkbootstrap for the Excel/WPS UI. A short working example is in [README.pypi.md](README.pypi.md).
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## 📋 Data Format
|
|
227
|
+
|
|
228
|
+
Organize data in **wide format** — each column is a group, each row is a replicate:
|
|
229
|
+
|
|
230
|
+
| Control | Treatment A | Treatment B |
|
|
231
|
+
|---------|-------------|-------------|
|
|
232
|
+
| 1.2 | 2.3 | 3.1 |
|
|
233
|
+
| 1.4 | 2.1 | 2.9 |
|
|
234
|
+
| 1.1 | 2.5 | 3.3 |
|
|
235
|
+
|
|
236
|
+
For multi-target experiments (WB/qPCR labeled mode), add a label column:
|
|
237
|
+
|
|
238
|
+
| Label | Control | Treatment A | Treatment B |
|
|
239
|
+
|--------|---------|-------------|-------------|
|
|
240
|
+
| EGFR | 1.2 | 2.3 | 3.1 |
|
|
241
|
+
| EGFR | 1.4 | 2.1 | 2.9 |
|
|
242
|
+
| GAPDH | 1.0 | 1.0 | 1.1 |
|
|
243
|
+
| GAPDH | 1.1 | 0.9 | 1.0 |
|
|
244
|
+
|
|
245
|
+
Select the range (including headers) → click Run. That's it. ✅
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## ⚙️ Settings
|
|
250
|
+
|
|
251
|
+
All options are in a tabbed dialog:
|
|
252
|
+
|
|
253
|
+
| Tab | Options |
|
|
254
|
+
| ----- | --------- |
|
|
255
|
+
| **⚡ General** | Chart type, error bars, data points, paired mode, annotation format, comparison mode |
|
|
256
|
+
| **🎨 Theme** | Base Theme · Layout · Palette · Color Style (each independently adjustable from the ribbon) |
|
|
257
|
+
| **🧪 Preset** | Experiment type (WB / qPCR / CCK-8 / ELISA) and specific options |
|
|
258
|
+
| **📤 Export** | Output format, DPI, file path |
|
|
259
|
+
|
|
260
|
+
Settings persist across sessions in `~/.xstars/settings.json`. 💾
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## 📌 Requirements
|
|
265
|
+
|
|
266
|
+
- 🪟 **Windows**: Microsoft Excel; Installer mode needs nothing else (the `.exe` bundles everything), Dev mode needs Python ≥ 3.10
|
|
267
|
+
- 🍎 **macOS installer mode**: Apple Silicon (`arm64`), macOS 14+, and Microsoft Excel for Mac 2016+; the `.pkg` includes Python and all runtime dependencies—see [docs/macos-installer.md](docs/macos-installer.md)
|
|
268
|
+
- 🍎 **macOS developer mode**: Microsoft Excel for Mac 2016+ and Python ≥ 3.10 for source debugging; see [docs/macos-developer-setup.md](docs/macos-developer-setup.md) (WPS for Mac is not supported)
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## 🤝 Contributing
|
|
273
|
+
|
|
274
|
+
Issues and pull requests are welcome!
|
|
275
|
+
|
|
276
|
+
## 📄 License
|
|
277
|
+
|
|
278
|
+
[MIT](LICENSE) — free for academic and commercial use.
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
<p align="center">
|
|
283
|
+
<sub>⭐ XSTARS — Excel-based Statistics Tool for Analysis, Rapid Significance · See the stars in your data.</sub>
|
|
284
|
+
</p>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# XSTARS
|
|
2
|
+
|
|
3
|
+
Excel and WPS statistics and publication figures for wet-lab assays: Western blot (WB), qPCR, CCK-8, and ELISA. XSTARS picks a statistical test, draws significance brackets, and saves a journal-style figure.
|
|
4
|
+
|
|
5
|
+
This is not the astronomy code [XSTAR](https://heasarc.gsfc.nasa.gov/xstar/xstar.html).
|
|
6
|
+
|
|
7
|
+
Most people should not install from PyPI. Download the Windows, macOS, or WPS installer from [GitHub Releases](https://github.com/Frankkk1912/xstars/releases). Those packages bundle Python and the spreadsheet add-in. No separate Python environment is required.
|
|
8
|
+
|
|
9
|
+
## Install from PyPI
|
|
10
|
+
|
|
11
|
+
Python users who want the statistics and plotting engine:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install xstars
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
That install is pandas, numpy, scipy, scikit-posthocs, matplotlib, seaborn, and Pillow. It does not install Excel or the settings dialogs.
|
|
18
|
+
|
|
19
|
+
The Excel/WPS UI (xlwings and ttkbootstrap) is an optional extra:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install "xstars[excel]"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`xstars[excel]` is for Windows and macOS spreadsheet hosts. The core package imports without xlwings, ttkbootstrap, or tkinter.
|
|
26
|
+
|
|
27
|
+
## Example
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
import pandas as pd
|
|
31
|
+
|
|
32
|
+
from xstars.application.analysis import analyze_dataframe
|
|
33
|
+
from xstars.config import PrismConfig
|
|
34
|
+
from xstars.plot_engine import PlotEngine
|
|
35
|
+
|
|
36
|
+
df = pd.DataFrame(
|
|
37
|
+
{
|
|
38
|
+
"Control": [1.1, 1.2, 1.0, 1.3, 1.15, 1.25],
|
|
39
|
+
"Treatment": [2.1, 2.4, 1.9, 2.2, 2.0, 2.3],
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
config = PrismConfig(title="Treatment vs control", y_label="Signal")
|
|
43
|
+
result = analyze_dataframe(df, config)
|
|
44
|
+
figure = PlotEngine(config).plot(result.transformed_data, result.stats_result)
|
|
45
|
+
figure.savefig("xstars_figure.png", dpi=200)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`analyze_dataframe` runs the shared transform, statistics, and plot pipeline. `PlotEngine` draws the figure that this example writes to `xstars_figure.png`.
|
|
49
|
+
|
|
50
|
+
## Links
|
|
51
|
+
|
|
52
|
+
- Source and full documentation: https://github.com/Frankkk1912/xstars
|
|
53
|
+
- 中文文档: https://github.com/Frankkk1912/xstars/blob/main/README.zh-CN.md
|
|
54
|
+
- Installers: https://github.com/Frankkk1912/xstars/releases
|
|
55
|
+
- Issues: https://github.com/Frankkk1912/xstars/issues
|