Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
fc85020
UI polish: settings button in the far bottom-right corner, margin fro…
adrobi Oct 24, 2026
61a9072
Tree viewer stage 2: custom renderer, layouts, supports, collapse, ou…
adrobi Oct 24, 2026
7695caf
Stage 3: run history, parameter presets, batch queue with retry, open…
adrobi Oct 24, 2026
03c4df2
Stage 4: IQ-TREE engine with ModelFinder, alignment info, XLSX export
adrobi Oct 24, 2026
bbe1087
Stage 5: tests in the repository, CI workflow, headless CLI
adrobi Oct 24, 2026
a631dd7
Fix crash on Run click and margin from the left splitter in the tree …
adrobi Oct 24, 2026
bb7d1bb
Rework tree rendering: real distance grid, non-overlapping supports, …
adrobi Oct 24, 2026
55e6b20
Fix tree direction: internal nodes sit at their own cumulative depth
adrobi Oct 24, 2026
40ebc15
Fix empty-input worker crash, IQ-TREE UFBoot/model errors, circular p…
adrobi Oct 24, 2026
997c869
Add Foundation design spec and RAxML-NG Windows build spike
adrobi Oct 24, 2026
dc907cb
Keep .patch files LF so they apply to upstream sources on Windows che…
adrobi Oct 24, 2026
4f10619
Add the Foundation implementation plan (15 tasks)
adrobi Oct 24, 2026
5e31349
Move binary-free test checks to pytest with fixtures in tests/data
adrobi Oct 24, 2026
6fc906d
Move end-to-end and GUI suites to pytest with binary markers
adrobi Oct 24, 2026
6f15bf0
Share window and warned fixtures, bound the IQ-TREE probe, restore lo…
adrobi Oct 24, 2026
55bc295
Add AppPaths and settings with atomic save, type coercion and legacy …
adrobi Oct 24, 2026
171f02f
Make legacy migration copy-once without overwrites and let load raise…
adrobi Oct 24, 2026
72d9eb8
Add HistoryStore with full run params and engine-aware presets
adrobi Oct 24, 2026
c705481
Drop non-dict history entries on load and derive the folder label fro…
adrobi Oct 24, 2026
14f943f
Store settings and history in the data dir via AppPaths, migrate lega…
adrobi Oct 24, 2026
38ed458
Block auto-save after a failed migration while the data dir has no co…
adrobi Oct 30, 2026
0945772
Add launchers, the Engine interface and the PhyML engine with argv tests
adrobi Oct 30, 2026
42fcd73
Add the IQ-TREE engine and an engine registry; the model list comes f…
adrobi Oct 30, 2026
79cbba3
Add alignment helpers with BOM-tolerant reading and ID collision dete…
adrobi Oct 30, 2026
6b5bb5c
Read FASTA with a locale-encoding fallback and write PHYLIP in the lo…
adrobi Oct 30, 2026
78d79be
Add a Qt-free PipelineRunner that never raises and cancels whole proc…
adrobi Oct 30, 2026
b09caf4
Keep the error of a failure that coincides with a cancel and kill out…
adrobi Oct 30, 2026
b9a790a
Move the CSV/XLSX run summary into phyml_core.report
adrobi Oct 30, 2026
c9156bc
Drive the window through PipelineRunner and RunWorker; log levels com…
adrobi Oct 30, 2026
a25dccc
Allow one run at a time and kill the run's process tree synchronously…
adrobi Oct 30, 2026
fb16519
Run the CLI on PipelineRunner without importing PySide6
adrobi Oct 30, 2026
947c6fd
Split LogConsole, SettingsDialog and the status bar out of main_window
adrobi Oct 30, 2026
5788dee
Split parameter and navigation panels; main_window only composes the …
adrobi Oct 31, 2026
d32e2ac
Run the full pytest suite in CI with pinned IQ-TREE and MUSCLE
adrobi Oct 31, 2026
af62efe
Fix findings of the final foundation review
adrobi Oct 31, 2026
eab0e34
Make the fake tool write bytes so Cyrillic paths survive a cp1252 pipe
adrobi Oct 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# patches are applied to upstream LF sources: never convert their line endings
*.patch text eol=lf
35 changes: 35 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: tests

on:
push:
branches: [master]
pull_request:

jobs:
test:
runs-on: windows-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.13']
env:
QT_QPA_PLATFORM: offscreen
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -r requirements.txt -r requirements-dev.txt
- name: Cache pinned IQ-TREE and MUSCLE
id: third-party
uses: actions/cache@v4
with:
path: bin
key: third-party-${{ hashFiles('packaging/third_party.json') }}
- name: Fetch pinned IQ-TREE and MUSCLE
if: steps.third-party.outputs.cache-hit != 'true'
run: python scripts/fetch_third_party.py --dest bin
- name: Tests
run: python -m pytest -q -rs
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ phymlgui v1.1/
tools/
testrun/
ROADMAP.md
phyml_history.json
release_body.md
release.json
release_resp.json
asset_resp.json
asset_resp.json
/bin/
56 changes: 38 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,30 @@
**phymlGUI** is a graphical interface for Windows that automates the construction of phylogenetic trees using the Maximum Likelihood method.

### 🛠 Core Capabilities
* **Integrated Pipeline:** Automatically detects unaligned sequences and runs **MUSCLE** before passing data to **PhyML**.
* **Two Engines:** **PhyML** (serial or MPI) and **IQ-TREE** (automatic model selection with ModelFinder, ultrafast bootstrap) — switchable in Settings.
* **Integrated Pipeline:** Automatically detects unaligned sequences and runs **MUSCLE** before passing data to the engine.
* **Parallel Computing (MPI):** Supports execution via `mpirun`/`mpiexec` for multi-core processing; MPI binaries are detected automatically and misconfigured bootstrap runs are blocked with an explanation.
* **Batch Mode:** Process a whole folder of FASTA files in one run — per-file log sections, a final N/M summary and an automatic `phymlgui_summary.csv` report.
* **Batch Mode:** Process a whole folder of FASTA files in one run — a live per-file queue with statuses, retry of failed files, an N/M summary and automatic `phymlgui_summary.csv` / `.xlsx` reports.
* **Hardware Awareness:** Physical/logical core detection (the `np` field is pre-filled), plus a live CPU status bar showing both system load and the utilization of the analysis process tree.
* **Run Statistics:** Model, taxa count, log-likelihood, gamma shape, Ts/Tv and run time are printed in the log after every analysis.
* **Data Sanitization:** Automatically cleans sequence IDs and alignments from characters that cause PhyML to crash (dots, colons, brackets, spaces).
* **Format Conversion:** Converts `FASTA` to `PHYLIP-relaxed` format, supporting long sequence names.
* **Visualization:** Built-in viewer for Newick trees with support for branch labels and image export.
* **Configuration Persistence:** Automatic saving and loading of all parameters and file paths via `phyml_config.json`.
* **Tree Viewer:** Rectangular / slanted / circular layouts, support-value threshold highlighting, clade collapsing, outgroup rerooting, majority-rule consensus from bootstrap trees, Robinson–Foulds topology comparison and PNG/SVG/PDF export.
* **Run History and Presets:** every run is recorded (double-click reloads its tree); built-in and user parameter presets.
* **Headless CLI:** `python phymlgui.py --file data.fasta` / `--batch folder/` runs the same pipeline without the GUI. Settings come from the data folder (not from a `phyml_config.json` in the current directory); `--config preset.json` is a JSON object laid over them. Exit codes: 0 success, 1 a file failed or the run was cancelled, 2 usage or input problem.
* **Data Sanitization / Conversion:** cleans sequence IDs, converts `FASTA` to `PHYLIP-relaxed`.
* **Themes:** light/dark (can follow the Windows system theme) with a selectable accent color.

### ⚙️ Requirements
* **Executables:** `phyml.exe` (or MPI version) and `muscle.exe`.
* **Python packages:** Python 3.9+ with `PySide6`, `matplotlib`, `biopython` and `psutil` (`pip install -r requirements.txt`).
* **Python packages:** Python 3.11+ with `PySide6`, `matplotlib`, `biopython` and `psutil` (`pip install -r requirements.txt`).
* **MPI Environment:** For parallel mode, **Microsoft MPI** is required (install `msmpisetup.exe` from the official Microsoft GitHub).
* **Settings and history:** stored next to the exe when that folder is writable, otherwise in `%APPDATA%\phymlGUI`. Set `PHYMLGUI_DATA_DIR` to use another folder.

### 🧪 Tests
```
pip install -r requirements.txt -r requirements-dev.txt
python scripts/fetch_third_party.py --dest bin # pinned IQ-TREE and MUSCLE (SHA256-verified)
python -m pytest
```
Analysis binaries are looked up in `bin/` and in the variables `PHYMLGUI_PHYML`, `PHYMLGUI_MPIEXEC`, `PHYMLGUI_IQTREE`, `PHYMLGUI_MUSCLE`, `PHYMLGUI_RAXML` (full path to the executable). Tests that need a missing binary are skipped. Markers: `needs_phyml`, `needs_mpi`, `needs_iqtree`, `needs_muscle`, `slow`; CI runs plain `python -m pytest -q -rs`; the tests whose binaries are not installed there are skipped. Tests never touch your real settings: they use an isolated data folder.

---

Expand All @@ -33,20 +43,30 @@
**phymlGUI** — графический интерфейс для Windows, автоматизирующий построение филогенетических деревьев методом максимального правдоподобия.

### 🛠 Основные возможности
* **Интегрированный пайплайн:** Автоматическое определение невыровненных последовательностей и запуск **MUSCLE** перед началом работы **PhyML**.
* **Параллельные вычисления (MPI):** Поддержка запуска через `mpirun`/`mpiexec`; MPI-бинарники определяются автоматически, а некорректная конфигурация бутстрепа блокируется с пояснением.
* **Пакетный режим:** Обработка целой папки FASTA-файлов за один запуск — секции лога по каждому файлу, итоговая сводка N/M и автоматический отчёт `phymlgui_summary.csv`.
* **Аппаратная осведомлённость:** Определение физических/логических ядер (поле `np` заполняется автоматически) и живая строка состояния с загрузкой CPU — как системы, так и дерева процессов анализа.
* **Статистика прогона:** Модель, число таксонов, лог-правдоподобие, параметр гаммы, Ts/Tv и время выводятся в лог после каждого анализа.
* **Санитарная очистка данных:** Автоматическая замена символов в ID и последовательностях, вызывающих ошибки в PhyML (точки, двоеточия, скобки, пробелы).
* **Конвертация форматов:** Перевод из `FASTA` в `PHYLIP-relaxed` с поддержкой длинных названий последовательностей.
* **Визуализация:** Встроенный просмотрщик деревьев в формате Newick с отображением поддержек ветвей и возможностью сохранения графики.
* **Сохранение состояния:** Автоматическое сохранение всех настроек и путей в файл `phyml_config.json`.
* **Два движка:** **PhyML** (последовательно или MPI) и **IQ-TREE** (автоподбор модели ModelFinder, ультрабыстрый бутстреп) — переключение в настройках.
* **Интегрированный пайплайн:** Автоматическое определение невыровненных последовательностей и запуск **MUSCLE** перед анализом.
* **Параллельные вычисления (MPI):** Запуск через `mpirun`/`mpiexec`; MPI-бинарники определяются автоматически, некорректная конфигурация бутстрепа блокируется с пояснением.
* **Пакетный режим:** Обработка папки FASTA-файлов — живая очередь со статусами, повтор неудавшихся, сводка N/M и автоматические отчёты `phymlgui_summary.csv` / `.xlsx`.
* **Аппаратная осведомлённость:** Определение физических/логических ядер и живая строка состояния с загрузкой CPU — системы и дерева процессов анализа.
* **Просмотрщик деревьев:** Прямоугольная/сланцевая/круговая раскладки, подсветка поддержек по порогу, сворачивание клад, рерутинг по outgroup, консенсус большинства из бутстреп-деревьев, сравнение топологий по Робинсону–Фаулдсу, экспорт PNG/SVG/PDF.
* **История и пресеты:** каждый запуск записывается (двойной клик загружает его дерево); встроенные и пользовательские пресеты параметров.
* **Консольный режим:** `python phymlgui.py --file data.fasta` / `--batch папка/` — тот же пайплайн без GUI. Настройки берутся из папки данных (а не из `phyml_config.json` в текущей папке); `--config preset.json` — JSON-объект, накладываемый поверх них. Коды выхода: 0 — успех, 1 — файл не обработан или запуск отменён, 2 — ошибка аргументов или входных данных.
* **Очистка и конвертация:** санитарная очистка ID, перевод `FASTA` → `PHYLIP-relaxed`.
* **Темы:** светлая/тёмная (могут следовать системной Windows) с выбором акцентного цвета.

### ⚙️ Требования
* **Программные файлы:** `phyml.exe` (или MPI-версия) и `muscle.exe`.
* **Python-зависимости:** Python 3.9+ с пакетами `PySide6`, `matplotlib`, `biopython` и `psutil` (`pip install -r requirements.txt`).
* **Python-зависимости:** Python 3.11+ с пакетами `PySide6`, `matplotlib`, `biopython` и `psutil` (`pip install -r requirements.txt`).
* **Среда MPI:** Для работы в параллельном режиме требуется установленный **Microsoft MPI** (инсталлятор `msmpisetup.exe` можно найти на официальном GitHub Microsoft).
* **Настройки и история:** хранятся рядом с exe, если папка доступна для записи, иначе в `%APPDATA%\phymlGUI`. Другую папку можно задать переменной `PHYMLGUI_DATA_DIR`.

### 🧪 Тесты
```
pip install -r requirements.txt -r requirements-dev.txt
python scripts/fetch_third_party.py --dest bin # закреплённые IQ-TREE и MUSCLE (проверка SHA256)
python -m pytest
```
Бинарники анализа ищутся в `bin/` и в переменных `PHYMLGUI_PHYML`, `PHYMLGUI_MPIEXEC`, `PHYMLGUI_IQTREE`, `PHYMLGUI_MUSCLE`, `PHYMLGUI_RAXML` (полный путь к exe). Тесты, которым нужен отсутствующий бинарник, пропускаются. Маркеры: `needs_phyml`, `needs_mpi`, `needs_iqtree`, `needs_muscle`, `slow`; CI запускает просто `python -m pytest -q -rs`; тесты, для которых на CI нет бинарников, пропускаются. Тесты не трогают ваши настройки: они работают в изолированной папке данных.

---

Expand Down
Loading
Loading