diff --git a/Dockerfile b/Dockerfile index 73e4afc..6410ffe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04 +# Fully-qualified base image (docker.io/...) so Podman/Buildah never prompts for a +# short-name registry. See "Troubleshooting" in README.md. +FROM docker.io/nvidia/cuda:12.4.1-runtime-ubuntu22.04 ENV DEBIAN_FRONTEND=noninteractive ENV TZ=UTC @@ -18,9 +20,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* # ============================================================ -# Julia 1.11 (matches environment/Manifest.toml julia_version = "1.11.3") +# Julia 1.11 (matches environment/Manifest.toml julia_version = "1.11.7") # ============================================================ -RUN curl -fsSL https://julialang-s3.julialang.org/bin/linux/x64/1.11/julia-1.11.3-linux-x86_64.tar.gz \ +RUN curl -fsSL https://julialang-s3.julialang.org/bin/linux/x64/1.11/julia-1.11.7-linux-x86_64.tar.gz \ | tar -xz -C /usr/local --strip-components=1 # ============================================================ @@ -40,12 +42,16 @@ COPY . . # ============================================================ # Julia environment # ============================================================ -RUN julia --project=/app/environment -e 'using Pkg; Pkg.resolve(); Pkg.instantiate(); Pkg.precompile()' +# Instantiate from the committed Manifest.toml (no resolve: the lock is complete, +# and resolving against a fresh registry is fragile). No explicit precompile: +# GLMakie is a GUI-only dependency that fails to precompile headlessly, but the +# pipeline never loads it, so it must not fail the build. +RUN julia --project=/app/environment -e 'using Pkg; Pkg.instantiate()' # ============================================================ # Environment variables # ============================================================ -ENV PYTHONPATH="/app/scripts/python:${PYTHONPATH}" +ENV PYTHONPATH="/app/scripts_python:${PYTHONPATH}" ENV DISPLAY=:99 LABEL maintainer="MSI Julia-Python CNN" diff --git a/Dockerfile.cpu b/Dockerfile.cpu index ca264da..eaa55f1 100644 --- a/Dockerfile.cpu +++ b/Dockerfile.cpu @@ -1,4 +1,6 @@ -FROM ubuntu:22.04 +# Fully-qualified base image (docker.io/...) so Podman/Buildah never prompts for a +# short-name registry. See "Troubleshooting" in README.md. +FROM docker.io/library/ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive ENV TZ=UTC @@ -18,9 +20,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* # ============================================================ -# Julia 1.11 (matches environment/Manifest.toml julia_version = "1.11.3") +# Julia 1.11 (matches environment/Manifest.toml julia_version = "1.11.7") # ============================================================ -RUN curl -fsSL https://julialang-s3.julialang.org/bin/linux/x64/1.11/julia-1.11.3-linux-x86_64.tar.gz \ +RUN curl -fsSL https://julialang-s3.julialang.org/bin/linux/x64/1.11/julia-1.11.7-linux-x86_64.tar.gz \ | tar -xz -C /usr/local --strip-components=1 # ============================================================ @@ -40,7 +42,11 @@ COPY . . # ============================================================ # Julia environment # ============================================================ -RUN julia --project=/app/environment -e 'using Pkg; Pkg.resolve(); Pkg.instantiate(); Pkg.precompile()' +# Instantiate from the committed Manifest.toml (no resolve: the lock is complete, +# and resolving against a fresh registry is fragile). No explicit precompile: +# GLMakie is a GUI-only dependency that fails to precompile headlessly, but the +# pipeline never loads it, so it must not fail the build. +RUN julia --project=/app/environment -e 'using Pkg; Pkg.instantiate()' # ============================================================ # Environment variables diff --git a/Makefile b/Makefile index 92bfc75..55e546b 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,11 @@ -.PHONY: build build-cpu run run-cpu shell shell-cpu \ - pipeline run-dataset \ +.PHONY: build build-cpu run run-cpu run-gpu shell shell-cpu \ + pipeline run-dataset run-dataset-cpu run-dataset-gpu \ step1 step2 step3 step4 step5 step6 step7 \ plot-spectra clean clean-all +# Opt-in NVIDIA GPU: layer the override file (see README "Troubleshooting"). +GPU_COMPOSE = docker compose -f docker-compose.yml -f docker-compose.gpu.yml + # ============================================================ # Build # ============================================================ @@ -21,6 +24,9 @@ run: run-cpu: docker compose run --rm msi-pipeline-cpu bash run_full_pipeline.sh +run-gpu: + $(GPU_COMPOSE) run --rm msi-pipeline-gpu bash run_full_pipeline.sh + # ============================================================ # Run single dataset # ============================================================ @@ -28,6 +34,14 @@ run-dataset: @if [ -z "$(D)" ]; then echo "Usage: make run-dataset D=Datura_leaf"; exit 1; fi docker compose run --rm msi-pipeline-gpu bash run_full_pipeline.sh $(D) +run-dataset-cpu: + @if [ -z "$(D)" ]; then echo "Usage: make run-dataset-cpu D=Datura_leaf"; exit 1; fi + docker compose run --rm msi-pipeline-cpu bash run_full_pipeline.sh $(D) + +run-dataset-gpu: + @if [ -z "$(D)" ]; then echo "Usage: make run-dataset-gpu D=Datura_leaf"; exit 1; fi + $(GPU_COMPOSE) run --rm msi-pipeline-gpu bash run_full_pipeline.sh $(D) + # ============================================================ # Interactive shell # ============================================================ diff --git a/README.md b/README.md index a32e1b8..50a2363 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ required. Raw MSI datasets are supplied by the user (see [Datasets](#datasets)). ├── run_full_pipeline.sh # single entry point: 7 stages (one or many datasets) ├── environment/ # pinned dependencies │ ├── Project.toml # Julia package set -│ ├── Manifest.toml # locked Julia environment (julia 1.11.3) +│ ├── Manifest.toml # locked Julia environment (julia 1.11.7) │ └── requirements.txt # Python deps (torch, sklearn, Pillow, …) ├── src/ # vendored JuliaMSI engine (MIT) — see below │ └── MSI_src.jl + 14 modules # memory-mapped imzML, TrIQ, slicing, masks @@ -67,33 +67,41 @@ required. Raw MSI datasets are supplied by the user (see [Datasets](#datasets)). ## Quick start (Docker, recommended) ```bash -# 1) build the GPU image (use `make build-cpu` for the CPU image) +# 1) build (GPU image; `make build-cpu` for the smaller CPU-only image) make build # 2) put each dataset in its own folder, e.g. # datos_para_ai/Datura_leaf/.imzML (+ .ibd, optional ROI .png) -# 3) run +# 3) run — works on CPU out of the box (torch falls back when there is no GPU) make run # every dataset under datos_para_ai/ make run-dataset D=Datura_leaf # a single dataset + +# with an NVIDIA GPU (needs the Container Toolkit / a CDI spec — see Troubleshooting): +make run-gpu +make run-dataset-gpu D=Datura_leaf ``` -Equivalent raw Docker, if you prefer not to use `make`: +Equivalent raw container, if you prefer not to use `make`: ```bash docker build -t msi-pipeline-gpu . -docker run --gpus all --shm-size=2g -it \ + +# CPU (no GPU flags): +docker run --rm --shm-size=2g -it \ -v "$PWD/datos_para_ai:/app/datos_para_ai" \ -v "$PWD/outputs:/app/outputs" \ msi-pipeline-gpu bash +# add `--gpus all` (Docker) or `--device nvidia.com/gpu=all` (Podman + CDI) for a GPU. # then, inside the container: bash run_full_pipeline.sh # all datasets under datos_para_ai/ bash run_full_pipeline.sh Datura_leaf # a single dataset ``` -For CPU-only machines, build `Dockerfile.cpu` (`make build-cpu`) and drop `--gpus all`. -In VS Code the bundled `.devcontainer/` builds the GPU image with the right flags. +The pipeline runs fine **without a GPU** (SimCLR trains on CPU, just slower). The pure +`Dockerfile.cpu` image (`make build-cpu`, `make run-cpu`) is smaller if you never need CUDA. +In VS Code the bundled `.devcontainer/` requests a GPU. ## Native run (venv + system Julia) @@ -131,13 +139,29 @@ count `K`; Stage 3 prints and stores the best value (Silhouette optimum by defau ## Datasets The pipeline reads **any valid imzML** (profile or centroid) — it is **not** restricted to -the manuscript datasets. For each dataset create `datos_para_ai//` containing: +the manuscript datasets. + +**Each dataset must live in its own subfolder of `datos_para_ai/`.** The folder name *is* +the dataset name, and it becomes the `outputs//` directory. Files placed directly in +`datos_para_ai/` — **not inside a subfolder — are ignored** by `run_full_pipeline.sh`, so a +dataset dropped loose at the root will not be detected. + +``` +datos_para_ai/ +├── Mouse_bladder/ # folder name = dataset name +│ ├── HR2MSImouseurinarybladderS096.imzML # exactly one .imzML +│ ├── HR2MSImouseurinarybladderS096.ibd # its sibling .ibd (matching basename) +│ └── region_of_interest.png # optional ROI mask +└── Datura_leaf/ + ├── Leaf.imzML + └── Leaf.ibd +``` + +Rules for each dataset folder: - exactly one `.imzML` file, and -- its sibling `.ibd` binary (the imzML references the `.ibd` by basename, so both must sit - in the same folder). - -The folder name becomes the dataset name used throughout `outputs/`. +- its sibling `.ibd` binary — the imzML references the `.ibd` by basename, so both must sit + in the same folder with matching basenames. **ROI masks are optional.** If present in the same folder, the first match wins: `region_of_interest.png`, otherwise any `*.png` whose filename contains `roi`, `mask`, or @@ -207,6 +231,123 @@ outputs (`outputs//msi_tsne_plot.png`, `outputs//figures/cluster_validation_detailed_plot.png`, `outputs//galleries/`). Re-run that script after any pipeline change to regenerate them. +## Troubleshooting + +### `? Please select an image:` at `STEP 1/15` (Podman / Buildah) + +When a `FROM` uses a short image name (e.g. `nvidia/cuda:12.4.1-runtime-ubuntu22.04`), +Docker resolves it against Docker Hub automatically, but **Podman/Buildah enforces +short-name resolution**: if more than one registry is configured it stops and asks which +one to pull from. A typical prompt (the list depends on your registry configuration): + +``` +? Please select an image: + ▸ registry.fedoraproject.org/nvidia/cuda:12.4.1-runtime-ubuntu22.04 + registry.access.redhat.com/nvidia/cuda:12.4.1-runtime-ubuntu22.04 + docker.io/nvidia/cuda:12.4.1-runtime-ubuntu22.04 +``` + +**Choose `docker.io/nvidia/cuda:12.4.1-runtime-ubuntu22.04`** — NVIDIA publishes these +images on Docker Hub. + +To avoid the prompt entirely (recommended, works on every OS): use the **fully-qualified** +name. This repository's Dockerfiles already do this, so no prompt should appear: + +```dockerfile +FROM docker.io/nvidia/cuda:12.4.1-runtime-ubuntu22.04 # Dockerfile (GPU) +FROM docker.io/library/ubuntu:22.04 # Dockerfile.cpu (CPU) +``` + +If you maintain a fork with short names and cannot change the Dockerfile, you can allow +short names globally instead. Edit the Containers registry config: + +- Linux/macOS (rootless): `~/.config/containers/registries.conf` +- Linux (root): `/etc/containers/registries.conf` +- Windows: `%APPDATA%\containers\registries.conf` + +```toml +unqualified-search-registries = ["docker.io"] +short-name-mode = "permissive" +``` + +- **Docker Desktop (Windows/macOS) and Docker Engine (Linux):** no prompt — `nvidia/cuda` + resolves to Docker Hub by default. +- **Podman (Linux/macOS/Windows):** prompted unless the name is fully qualified or the + config above is set. + +### Clean rebuild / remove a failed build + +A **failed build usually leaves no tagged project image** — only intermediary layers and +build cache. Clearing the cache is therefore the important step; there is often nothing to +`rmi`. + +Docker (Linux/Windows/macOS): + +```bash +docker compose down --rmi all --volumes --remove-orphans # project-scoped reset +docker rmi -f msi-pipeline-gpu msi-pipeline-cpu 2>/dev/null || true +docker builder prune -af # clear BuildKit cache +docker image prune -f # drop dangling images +docker compose build --no-cache msi-pipeline-gpu # rebuild from scratch +``` + +Podman / `podman-compose`: + +```bash +podman-compose down --rmi all -v +podman rmi -f $(podman images --format '{{.ID}} {{.Repository}}' \ + | awk 'tolower($0) ~ /msi-pipeline/ {print $1}') 2>/dev/null || true +podman builder prune -af +podman-compose build --no-cache msi-pipeline-gpu +``` + +Global reset (**careful — removes all unused images/cache, not just this project**): + +```bash +docker system prune -a --volumes -f # Docker (same as `make clean-all`) +podman system prune -a --volumes -f # Podman +``` + +Notes: +- `docker builder prune -af` / `podman builder prune -af` affect this project's cache + safely; the `system prune -a` commands are host-wide. +- A normal `make build` reuses cached `apt`/Julia/pip layers. For a genuine + reproducibility test, clear the cache (`builder prune -af`) or build with `--no-cache`. + +### `make run` fails with `unresolvable CDI devices nvidia.com/gpu=all` + +The base `docker-compose.yml` does **not** request a GPU, so `make run` / `make run-dataset` +work on CPU-only machines. Requesting a GPU is opt-in via `docker-compose.gpu.yml`: + +```bash +make run-gpu +make run-dataset-gpu D=Datura_leaf +``` + +On **Podman**, a GPU reservation becomes the CDI device `nvidia.com/gpu=all`, which must +exist first: + +```bash +# one-time, on the host (needs the NVIDIA driver + nvidia-container-toolkit): +sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml +nvidia-ctk cdi list # should show nvidia.com/gpu=all +``` + +Docker Desktop / Docker Engine handle the `deploy` GPU reservation without a manual CDI +spec. If you have no NVIDIA GPU, ignore `*-gpu` targets entirely — the CPU fallback works. + +### If the Julia step of the build fails + +- The images install Julia strictly from the committed `environment/Manifest.toml` and run + `Pkg.instantiate()` only (no `resolve()`). If you see + `… is a direct dependency, but does not appear in the manifest`, the lock is out of sync + with `Project.toml` — run `julia --project=environment -e 'using Pkg; Pkg.resolve()'` + locally and commit the regenerated `Manifest.toml`. +- `GLMakie` fails to precompile in a headless build + (`GLFWError … X11: The DISPLAY environment variable is missing`). This is expected and + **non-fatal**: GLMakie is a GUI-only dependency and the pipeline never loads it. The + images intentionally do not run an explicit `Pkg.precompile()`. + ## License MIT — see `LICENSE`. The vendored `src/` retains its own MIT license (`src/LICENSE`). diff --git a/docker-compose.gpu.yml b/docker-compose.gpu.yml new file mode 100644 index 0000000..8563769 --- /dev/null +++ b/docker-compose.gpu.yml @@ -0,0 +1,22 @@ +# Opt-in GPU override. The base docker-compose.yml does NOT request a GPU, so +# `make run` works on CPU-only machines. To use an NVIDIA GPU, layer this file: +# +# docker compose -f docker-compose.yml -f docker-compose.gpu.yml \ +# run --rm msi-pipeline-gpu bash run_full_pipeline.sh +# (or: make run-gpu / make run-dataset-gpu D=) +# +# Requirements: an NVIDIA GPU + NVIDIA Container Toolkit. +# On Podman, first generate the CDI spec, otherwise you get +# "unresolvable CDI devices nvidia.com/gpu=all": +# +# sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml +# +services: + msi-pipeline-gpu: + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] diff --git a/docker-compose.yml b/docker-compose.yml index 4597da4..ed9abf5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,15 +7,10 @@ services: working_dir: /app shm_size: "2gb" volumes: - - ./datos_para_ai:/app/datos_para_ai - - ./outputs:/app/outputs - deploy: - resources: - reservations: - devices: - - driver: nvidia - count: all - capabilities: [gpu] + # `:z` relabels the bind mount for SELinux hosts (Fedora/RHEL + Podman). + # It is ignored by Docker. Remove it if your host has no SELinux. + - ./datos_para_ai:/app/datos_para_ai:z + - ./outputs:/app/outputs:z msi-pipeline-cpu: build: @@ -25,5 +20,7 @@ services: working_dir: /app shm_size: "2gb" volumes: - - ./datos_para_ai:/app/datos_para_ai - - ./outputs:/app/outputs + # `:z` relabels the bind mount for SELinux hosts (Fedora/RHEL + Podman). + # It is ignored by Docker. Remove it if your host has no SELinux. + - ./datos_para_ai:/app/datos_para_ai:z + - ./outputs:/app/outputs:z diff --git a/environment/Manifest.toml b/environment/Manifest.toml index cdfba11..0a41c77 100644 --- a/environment/Manifest.toml +++ b/environment/Manifest.toml @@ -1,20 +1,14 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.11.3" +julia_version = "1.11.7" manifest_format = "2.0" -project_hash = "76cbec1aac4016ed87eedf9fd86c6d8f60db717a" +project_hash = "7188b9b39bd77958c3311145374c6895640cf4f2" [[deps.ANSIColoredPrinters]] git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c" uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9" version = "0.0.1" -[[deps.ATK_jll]] -deps = ["Artifacts", "Glib_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c0a10eaf3a7e1e909ef8fe45971a73524bfce1bf" -uuid = "7b86fcea-f67b-53e1-809c-8f1719c154e8" -version = "2.38.1+0" - [[deps.AbstractFFTs]] deps = ["LinearAlgebra"] git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" @@ -83,12 +77,6 @@ git-tree-sha1 = "e092fa223bf66a3c41f9c022bd074d916dc303e7" uuid = "27a7e980-b3e6-11e9-2bcd-0b925532e340" version = "0.4.2" -[[deps.ArgParse]] -deps = ["Logging", "TextWrap"] -git-tree-sha1 = "22cf435ac22956a7b45b0168abbc871176e7eecc" -uuid = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" -version = "1.2.0" - [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" version = "1.1.2" @@ -295,12 +283,6 @@ git-tree-sha1 = "3e22db924e2945282e70c33b75d4dde8bfa44c94" uuid = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5" version = "0.15.8" -[[deps.CodeTracking]] -deps = ["InteractiveUtils", "REPL", "UUIDs"] -git-tree-sha1 = "cfb7a2e89e245a9d5016b70323db412b3a7438d5" -uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" -version = "3.0.2" - [[deps.CodecBase]] deps = ["TranscodingStreams"] git-tree-sha1 = "40956acdbef3d8c7cc38cba42b56034af8f8581a" @@ -357,17 +339,6 @@ git-tree-sha1 = "37ea44092930b1811e666c3bc38065d7d87fcc74" uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" version = "0.13.1" -[[deps.CommonMark]] -deps = ["PrecompileTools"] -git-tree-sha1 = "731edf630eb23140a3c7a2e74d4186f562996d76" -uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6" -version = "1.0.2" -weakdeps = ["Markdown", "MarkdownAST"] - - [deps.CommonMark.extensions] - CommonMarkMarkdownASTExt = "MarkdownAST" - CommonMarkMarkdownExt = "Markdown" - [[deps.CommonWorldInvalidations]] git-tree-sha1 = "ae52d1c52048455e85a387fbee9be553ec2b68d0" uuid = "f70d9fcc-98c5-4d4a-abd7-e4cdeebd8ca8" @@ -383,11 +354,6 @@ weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] CompatLinearAlgebraExt = "LinearAlgebra" -[[deps.Compiler]] -git-tree-sha1 = "382d79bfe72a406294faca39ef0c3cef6e6ce1f1" -uuid = "807dbc54-b67e-4c79-8afb-eafe4df6f2e1" -version = "0.1.1" - [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" @@ -419,12 +385,6 @@ git-tree-sha1 = "21d088c496ea22914fe80906eb5bce65755e5ec8" uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" version = "2.5.1" -[[deps.Configurations]] -deps = ["ExproniconLite", "OrderedCollections", "TOML"] -git-tree-sha1 = "4358750bb58a3caefd5f37a4a0c5bfdbbf075252" -uuid = "5218b696-f38b-4ac9-8b61-a12ec717816d" -version = "0.17.6" - [[deps.ConstructionBase]] git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" @@ -589,12 +549,6 @@ git-tree-sha1 = "56e9c37b5e7c3b4f080ab1da18d72d5c290e184a" uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" version = "1.17.0" -[[deps.DotEnv]] -deps = ["PrecompileTools"] -git-tree-sha1 = "92e88cb68a5b10545234f46dfaeb2fa8a8a50c45" -uuid = "4dc1fcf4-5e3b-5448-94ab-0c38ec0385c1" -version = "1.0.0" - [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" @@ -635,22 +589,11 @@ git-tree-sha1 = "c307cd83373868391f3ac30b41530bc5d5d05d08" uuid = "2e619515-83b5-522b-bb60-26c02a35a201" version = "2.8.1+0" -[[deps.ExproniconLite]] -git-tree-sha1 = "c13f0b150373771b0fdc1713c97860f8df12e6c2" -uuid = "55351af7-c7e9-48d6-89ff-24e801d99491" -version = "0.10.14" - [[deps.Extents]] git-tree-sha1 = "b309b36a9e02fe7be71270dd8c0fd873625332b4" uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910" version = "0.1.6" -[[deps.EzXML]] -deps = ["Printf", "XML2_jll"] -git-tree-sha1 = "7ea1aa5869e2626ccae84480e4f37185bc6f41d3" -uuid = "8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615" -version = "1.2.3" - [[deps.FFMPEG]] deps = ["FFMPEG_jll"] git-tree-sha1 = "95ecf07c2eea562b5adbd0696af6db62c0f52560" @@ -702,13 +645,17 @@ deps = ["FilePathsBase", "MacroTools", "Reexport"] git-tree-sha1 = "a1b2fbfe98503f15b665ed45b3d149e5d8895e4c" uuid = "8fc22ac5-c921-52a6-82fd-178b2807b824" version = "0.9.0" -weakdeps = ["Glob", "URIParser", "URIs"] [deps.FilePaths.extensions] FilePathsGlobExt = "Glob" FilePathsURIParserExt = "URIParser" FilePathsURIsExt = "URIs" + [deps.FilePaths.weakdeps] + Glob = "c27321d9-0574-5035-807b-f59d2c89b15c" + URIParser = "30578b45-9adc-5946-b283-645ec420af67" + URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" + [[deps.FilePathsBase]] deps = ["Compat", "Dates"] git-tree-sha1 = "3bab2c5aa25e7840a4b065805c0cdfc01f3068d2" @@ -783,29 +730,12 @@ deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" version = "1.11.0" -[[deps.GLFW]] -deps = ["GLFW_jll"] -git-tree-sha1 = "af06f66cca2b698ab9c482de55977ff8178d025e" -uuid = "f7f18e0c-5ee9-5ccd-a5bf-e8befd85ed98" -version = "3.4.6" - [[deps.GLFW_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] git-tree-sha1 = "9e0fb9e54594c47f278d75063980e43066e26e20" uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" version = "3.4.1+1" -[[deps.GLMakie]] -deps = ["ColorTypes", "Colors", "FileIO", "FixedPointNumbers", "FreeTypeAbstraction", "GLFW", "GeometryBasics", "LinearAlgebra", "Makie", "Markdown", "MeshIO", "ModernGL", "Observables", "PrecompileTools", "Printf", "ShaderAbstractions", "StaticArrays"] -git-tree-sha1 = "a9964f9ef0b244352e04d30e8c215ec232eee699" -uuid = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" -version = "0.13.11" - -[[deps.GMP_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" -version = "6.3.0+0" - [[deps.GR]] deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Qt6Wayland_jll", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"] git-tree-sha1 = "44716a1a667cb867ee0e9ec8edc31c3e4aa5afdc" @@ -824,60 +754,6 @@ git-tree-sha1 = "be8a1b8065959e24fdc1b51402f39f3b6f0f6653" uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" version = "0.73.24+0" -[[deps.GTK3_jll]] -deps = ["ATK_jll", "Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Libepoxy_jll", "Pango_jll", "Pkg", "Wayland_jll", "Xorg_libX11_jll", "Xorg_libXcomposite_jll", "Xorg_libXcursor_jll", "Xorg_libXdamage_jll", "Xorg_libXext_jll", "Xorg_libXfixes_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "Xorg_libXrender_jll", "at_spi2_atk_jll", "gdk_pixbuf_jll", "iso_codes_jll", "xkbcommon_jll"] -git-tree-sha1 = "b080a592525632d287aee4637a62682576b7f5e4" -uuid = "77ec8976-b24b-556a-a1bf-49a033a670a6" -version = "3.24.31+0" - -[[deps.GarishPrint]] -deps = ["Configurations", "Preferences"] -git-tree-sha1 = "41136d24cc02c4d7c2b8c8982823fedac66d0a45" -uuid = "b0ab02a7-8576-43f7-aa76-eaa7c3897c54" -version = "0.5.1" - -[[deps.Genie]] -deps = ["ArgParse", "Base64", "Dates", "Distributed", "DotEnv", "EzXML", "FilePathsBase", "HTTP", "HttpCommon", "Inflector", "JSON", "JuliaFormatter", "Logging", "LoggingExtras", "LoweredCodeUtils", "MIMEs", "Markdown", "Millboard", "Nettle", "OrderedCollections", "Pkg", "REPL", "Random", "Reexport", "Revise", "SHA", "Serialization", "Sockets", "UUIDs", "Unicode", "XML2_jll", "YAML"] -git-tree-sha1 = "a46899376abe9952677f05af653644c87d397fad" -uuid = "c43c736e-a2d1-11e8-161f-af95117fbd1e" -version = "5.35.14" - -[[deps.GenieAutoReload]] -deps = ["Distributed", "Genie", "Logging", "Revise"] -git-tree-sha1 = "d2c018ae2b097631c09a09d9e88cf551e3a378fc" -uuid = "c6228e60-a24f-11e9-1776-c313472ebacc" -version = "2.2.5" - -[[deps.GenieDevTools]] -deps = ["Dates", "Genie", "RemoteREPL", "Revise", "Stipple", "StippleUI", "Tables"] -git-tree-sha1 = "5c84de04cde55e272e760e7ef021bb645f53bd67" -uuid = "4e5d9629-6565-4102-a9ff-45c707eb060e" -version = "2.12.1" - -[[deps.GenieFramework]] -deps = ["GarishPrint", "Genie", "GenieAutoReload", "GenieDevTools", "GeniePackageManager", "Reexport", "Revise", "Stipple", "StipplePivotTable", "StipplePlotly", "StippleTable", "StippleTabs", "StippleUI"] -git-tree-sha1 = "3dcb24f1559dd015e09cb78aa4636b710c60a49e" -uuid = "a59fdf5c-6bf0-4f5d-949c-a137c9e2f353" -version = "3.0.1" - -[[deps.GeniePackageManager]] -deps = ["Base64", "Genie", "Pkg"] -git-tree-sha1 = "3e0a96753f53eab0d15ad837ef1a3742389c928b" -uuid = "3bdcc7f3-4b7d-42a1-be8e-724ecf5e3574" -version = "1.1.0" - -[[deps.GenieSession]] -deps = ["Dates", "Genie", "HTTP", "Logging", "Random", "SHA"] -git-tree-sha1 = "936838b4eccdd5a2b62b695558d5dbc1f5f56560" -uuid = "03cc5b98-4f21-4eb6-99f2-22eced81f962" -version = "1.1.2" - -[[deps.GenieSessionFileSession]] -deps = ["Genie", "GenieSession", "Logging", "Serialization"] -git-tree-sha1 = "5f5ffc33251d0d5f110072f7a0c07717c9453c97" -uuid = "5c4fdc26-39e3-47cf-9034-e533e09961c2" -version = "1.1.0" - [[deps.GeometryBasics]] deps = ["EarCut_jll", "Extents", "IterTools", "LinearAlgebra", "PrecompileTools", "Random", "StaticArrays"] git-tree-sha1 = "1f5a80f4ed9f5a4aada88fc2db456e637676414b" @@ -932,11 +808,6 @@ git-tree-sha1 = "24f6def62397474a297bfcec22384101609142ed" uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" version = "2.86.3+0" -[[deps.Glob]] -git-tree-sha1 = "246c628cec062230b7d183aab88841fa94fcabe9" -uuid = "c27321d9-0574-5035-807b-f59d2c89b15c" -version = "1.5.0" - [[deps.Graphics]] deps = ["Colors", "LinearAlgebra", "NaNMath"] git-tree-sha1 = "a641238db938fff9b2f60d08ed9030387daf428c" @@ -995,12 +866,6 @@ git-tree-sha1 = "af9ab7d1f70739a47f03be78771ebda38c3c71bf" uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" version = "0.1.18" -[[deps.HttpCommon]] -deps = ["Dates", "Nullables", "Test", "URIParser"] -git-tree-sha1 = "46313284237aa6ca67a6bce6d6fbd323d19cff59" -uuid = "77172c1b-203f-54ac-aa54-3f1198fe9f90" -version = "0.5.0" - [[deps.HypergeometricFunctions]] deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] git-tree-sha1 = "68c173f4f449de5b438ee67ed0c9c748dc31a2ec" @@ -1148,12 +1013,6 @@ git-tree-sha1 = "d1b1b796e47d94588b3757fe84fbf65a5ec4a80d" uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" version = "0.1.5" -[[deps.Inflector]] -deps = ["Unicode"] -git-tree-sha1 = "c82a172a07c94887709e613cc67cec0b472fb742" -uuid = "6d011eab-0732-4556-8808-e463c76bf3b6" -version = "1.1.0" - [[deps.InlineStrings]] git-tree-sha1 = "8f3d257792a522b4601c24a577954b0a8cd7334d" uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" @@ -1322,23 +1181,6 @@ git-tree-sha1 = "c0c9b76f3520863909825cbecdef58cd63de705a" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" version = "3.1.5+0" -[[deps.JuliaFormatter]] -deps = ["CommonMark", "Glob", "JuliaSyntax", "PrecompileTools", "TOML"] -git-tree-sha1 = "061c36ac4aa4e75fddfe40e22da3167a6271c7ce" -uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899" -version = "2.5.5" - -[[deps.JuliaInterpreter]] -deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"] -git-tree-sha1 = "58927c485919bf17ea308d9d82156de1adf4b006" -uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a" -version = "0.10.12" - -[[deps.JuliaSyntax]] -git-tree-sha1 = "0d4b3dab95018bcf3925204475693d9f09dc45b8" -uuid = "70703baa-626e-46a2-a12c-08ffd08c73b4" -version = "1.0.2" - [[deps.KernelDensity]] deps = ["Distributions", "DocStringExtensions", "FFTA", "Interpolations", "StatsBase"] git-tree-sha1 = "9eda8292dd3268b3b7ec9df21bbfac24e177ec52" @@ -1442,12 +1284,6 @@ version = "1.11.0+1" uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" version = "1.11.0" -[[deps.Libepoxy_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libX11_jll"] -git-tree-sha1 = "94d068f57b4241dd090693b6aba63416892298de" -uuid = "42c93a91-0102-5b3f-8f9d-e41de60ac950" -version = "1.5.11+0" - [[deps.Libffi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "c8da7e6a91781c41a863611c7e966098d783c57a" @@ -1550,17 +1386,6 @@ version = "0.12.174" NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" -[[deps.LoweredCodeUtils]] -deps = ["CodeTracking", "Compiler", "JuliaInterpreter"] -git-tree-sha1 = "86492c15dee3182863d7452dd2b2635242dedaca" -uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b" -version = "3.5.2" - -[[deps.MIMEs]] -git-tree-sha1 = "c64d943587f7187e751162b3b84445bbbd79f691" -uuid = "6c6e2e6c-3030-632d-7369-2d6c69616d65" -version = "1.1.0" - [[deps.MKL_jll]] deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] git-tree-sha1 = "282cadc186e7b2ae0eeadbd7a4dffed4196ae2aa" @@ -1627,45 +1452,22 @@ git-tree-sha1 = "b513cedd20d9c914783d8ad83d08120702bf2c77" uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" version = "0.3.3" -[[deps.MeshIO]] -deps = ["ColorTypes", "FileIO", "GeometryBasics", "Printf"] -git-tree-sha1 = "c009236e222df68e554c7ce5c720e4a33cc0c23f" -uuid = "7269a6da-0436-5bbc-96c2-40638cbb6118" -version = "0.5.3" - [[deps.MetaGraphs]] deps = ["Graphs", "JLD2", "Random"] git-tree-sha1 = "3a8f462a180a9d735e340f4e8d5f364d411da3a4" uuid = "626554b9-1ddb-594c-aa3c-2596fe9399a5" version = "0.8.1" -[[deps.Millboard]] -git-tree-sha1 = "ea6a5b7e56e76d8051023faaa11d91d1d881dac3" -uuid = "39ec1447-df44-5f4c-beaa-866f30b4d3b2" -version = "0.2.5" - [[deps.Missings]] deps = ["DataAPI"] git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" version = "1.2.0" -[[deps.Mixers]] -deps = ["MacroTools"] -git-tree-sha1 = "58ec7ac60dad6e8ca4553225251dfd380e3930dd" -uuid = "2a8e4939-dab8-5edc-8f64-72a8776f13de" -version = "0.1.2" - [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" version = "1.11.0" -[[deps.ModernGL]] -deps = ["Libdl"] -git-tree-sha1 = "ac6cb1d8807a05cf1acc9680e09d2294f9d33956" -uuid = "66fc600b-dfda-50eb-8b99-91cfa97b1301" -version = "1.1.8" - [[deps.MosaicViews]] deps = ["MappedArrays", "OffsetArrays", "PaddedViews", "StackViews"] git-tree-sha1 = "7b86a5d4d70a9f5cdf2dacb3cbe6d251d1a61dbe" @@ -1687,18 +1489,6 @@ git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" version = "1.1.3" -[[deps.NativeFileDialog]] -deps = ["FilePathsBase", "NativeFileDialog_jll"] -git-tree-sha1 = "6964c902c838b214cb4e8b4a94ca45e585c9d47b" -uuid = "e1fe445b-aa65-4df4-81c1-2041507f0fd4" -version = "0.2.1" - -[[deps.NativeFileDialog_jll]] -deps = ["Artifacts", "GTK3_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "916d2db66748820c8e8bc3329a2a23c42c1520de" -uuid = "94d9ae2c-efc7-56f8-9a02-54c47b797961" -version = "1.1.6+3" - [[deps.NaturalSort]] git-tree-sha1 = "eda490d06b9f7c00752ee81cfa451efe55521e21" uuid = "c020b1a1-e9b0-503a-9c33-f039bfc54a85" @@ -1716,27 +1506,10 @@ git-tree-sha1 = "d92b107dbb887293622df7697a2223f9f8176fcd" uuid = "f09324ee-3d7c-5217-9330-fc30815ba969" version = "1.1.1" -[[deps.Nettle]] -deps = ["Libdl", "Nettle_jll"] -git-tree-sha1 = "6fa48cbae828267848ee32c1bb31d1652e210d7d" -uuid = "49dea1ee-f6fa-5aa6-9a11-8816cee7d4b9" -version = "1.0.0" - -[[deps.Nettle_jll]] -deps = ["Artifacts", "GMP_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "2759db33ad6145e162d49d86360b350c9c79354f" -uuid = "4c82536e-c426-54e4-b420-14f461c4ed8b" -version = "3.10.2+0" - [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" -[[deps.Nullables]] -git-tree-sha1 = "8f87854cc8f3685a60689d8edecaa29d2251979b" -uuid = "4d1e1d77-625e-5b40-9113-a560ec7a8ecd" -version = "1.0.0" - [[deps.Observables]] git-tree-sha1 = "7438a59546cf62428fc9d1bc94729146d37a7225" uuid = "510215fc-4207-5dde-b226-833fc4488ee2" @@ -1789,7 +1562,7 @@ version = "2.5.5+0" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+2" +version = "0.8.5+0" [[deps.OpenSSH_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll", "Zlib_jll"] @@ -1847,12 +1620,6 @@ git-tree-sha1 = "32b657a0d57c310a1a172bfc8c8cf68c5e674323" uuid = "f57f5aa1-a3ce-4bc8-8ab9-96f992907883" version = "0.4.5" -[[deps.PackageCompiler]] -deps = ["Artifacts", "Glob", "LazyArtifacts", "Libdl", "Pkg", "Printf", "RelocatableFolders", "TOML", "UUIDs", "p7zip_jll"] -git-tree-sha1 = "5193091a937c1e84cab042d55f8071dd2116c6f2" -uuid = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" -version = "2.3.0" - [[deps.Packing]] deps = ["GeometryBasics"] git-tree-sha1 = "bc5bf2ea3d5351edf285a06b0016788a121ce92c" @@ -1916,24 +1683,6 @@ git-tree-sha1 = "26ca162858917496748aad52bb5d3be4d26a228a" uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" version = "1.4.4" -[[deps.PlotlyBase]] -deps = ["ColorSchemes", "Colors", "Dates", "DelimitedFiles", "DocStringExtensions", "JSON", "LaTeXStrings", "Logging", "Parameters", "Pkg", "REPL", "Requires", "Statistics", "UUIDs"] -git-tree-sha1 = "6256ab3ee24ef079b3afa310593817e069925eeb" -uuid = "a03496cd-edff-5a9b-9e67-9cda94a718b5" -version = "0.8.23" - - [deps.PlotlyBase.extensions] - DataFramesExt = "DataFrames" - DistributionsExt = "Distributions" - IJuliaExt = "IJulia" - JSON3Ext = "JSON3" - - [deps.PlotlyBase.weakdeps] - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" - IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" - JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" - [[deps.Plots]] deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "TOML", "UUIDs", "UnicodeFun", "Unzip"] git-tree-sha1 = "cb20a4eacda080e517e4deb9cfb6c7c518131265" @@ -2161,34 +1910,12 @@ git-tree-sha1 = "ffdaf70d81cf6ff22c2b6e733c900c3321cab864" uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" version = "1.0.1" -[[deps.RemoteREPL]] -deps = ["Logging", "OpenSSH_jll", "REPL", "ReplMaker", "Serialization", "Sockets", "UUIDs"] -git-tree-sha1 = "4dc40bec45f3c2dc8648e50438753a6be1b87f40" -uuid = "1bd9f7bb-701c-4338-bec7-ac987af7c555" -version = "0.3.1" - -[[deps.ReplMaker]] -deps = ["REPL", "Unicode"] -git-tree-sha1 = "f8bb680b97ee232c4c6591e213adc9c1e4ba0349" -uuid = "b873ce64-0db9-51f5-a568-4457d8e49576" -version = "0.2.7" - [[deps.Requires]] deps = ["UUIDs"] git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" uuid = "ae029012-a4dd-5104-9daa-d747884805df" version = "1.3.1" -[[deps.Revise]] -deps = ["CodeTracking", "FileWatching", "InteractiveUtils", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Preferences", "REPL", "UUIDs"] -git-tree-sha1 = "2f722c6581f297014be42c95d36f862e9bc2d668" -uuid = "295af30f-e4ad-537b-8983-00126c2a3abe" -version = "3.14.5" -weakdeps = ["Distributed"] - - [deps.Revise.extensions] - DistributedExt = "Distributed" - [[deps.Rmath]] deps = ["Random", "Rmath_jll"] git-tree-sha1 = "5b3d50eb374cea306873b371d3f8d3915a018f0b" @@ -2425,62 +2152,6 @@ weakdeps = ["ChainRulesCore", "InverseFunctions"] StatsFunsChainRulesCoreExt = "ChainRulesCore" StatsFunsInverseFunctionsExt = "InverseFunctions" -[[deps.Stipple]] -deps = ["Dates", "FilePathsBase", "Genie", "GenieSession", "GenieSessionFileSession", "JSON", "Logging", "MacroTools", "Mixers", "Observables", "OrderedCollections", "Parameters", "Pkg", "PrecompileTools", "Random", "Reexport", "Requires", "StructTypes", "Tables", "UUIDs"] -git-tree-sha1 = "64e23643aa0588543d876ab471dca4e717bb5e60" -uuid = "4acbeb90-81a0-11ea-1966-bdaff8155998" -version = "0.31.59" -weakdeps = ["DataFrames", "OffsetArrays"] - - [deps.Stipple.extensions] - StippleDataFramesExt = "DataFrames" - StippleOffsetArraysExt = "OffsetArrays" - -[[deps.StipplePivotTable]] -deps = ["Stipple", "StippleUI", "Tables"] -git-tree-sha1 = "98d96b177125630eb5d273b3e705aec22bb4ec86" -uuid = "adab0226-ee3c-44de-8f2f-393b1bf1e936" -version = "0.4.3" - -[[deps.StipplePlotly]] -deps = ["DataFrames", "Genie", "Requires", "Stipple"] -git-tree-sha1 = "ebeddabf8bf4c6c34070bd4f74f96937cb884d00" -uuid = "ec984513-233d-481d-95b0-a3b58b97af2b" -version = "0.14.12" -weakdeps = ["PlotlyBase", "Plots"] - - [deps.StipplePlotly.extensions] - StipplePlotlyPlotlyBaseExt = "PlotlyBase" - StipplePlotlyPlotsExt = ["Plots", "PlotlyBase"] - -[[deps.StippleTable]] -deps = ["Stipple", "StippleUI"] -git-tree-sha1 = "f4a36ed4b56181d459b47bd16429308a03e05c1c" -uuid = "5bb4b094-0818-496d-ae94-fd777e10e8ba" -version = "1.0.3" - -[[deps.StippleTabs]] -deps = ["Stipple", "StippleUI"] -git-tree-sha1 = "cf1440b0d7510c98553ed75c7ba0842780a45319" -uuid = "29f11006-3202-4091-a17b-0a26282d76dd" -version = "1.1.0" - -[[deps.StippleUI]] -deps = ["Colors", "Dates", "Genie", "OrderedCollections", "PrecompileTools", "Stipple", "Tables"] -git-tree-sha1 = "af3df0a29e3615477b468b7b28db25e59c72ee21" -uuid = "a3c5d34a-b254-4859-a8fa-b86abb7e84a3" -version = "0.24.21" -weakdeps = ["DataFrames"] - - [deps.StippleUI.extensions] - StippleUIDataFramesExt = "DataFrames" - -[[deps.StringEncodings]] -deps = ["Libiconv_jll"] -git-tree-sha1 = "b765e46ba27ecf6b44faf70df40c57aa3a547dcb" -uuid = "69024149-9ee7-55f6-a4c4-859efe599b68" -version = "0.3.7" - [[deps.StringManipulation]] deps = ["PrecompileTools"] git-tree-sha1 = "d05693d339e37d6ab134c5ab53c29fce5ee5d7d5" @@ -2508,12 +2179,6 @@ version = "0.7.3" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" -[[deps.StructTypes]] -deps = ["Dates", "UUIDs"] -git-tree-sha1 = "159331b30e94d7b11379037feeb9b690950cace8" -uuid = "856f2bd8-1eba-4b0a-8007-ebc267875bd4" -version = "1.11.0" - [[deps.StructUtils]] deps = ["Dates", "UUIDs"] git-tree-sha1 = "82bee338d650aa515f31866c460cb7e3bcef90b8" @@ -2576,11 +2241,6 @@ deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" version = "1.11.0" -[[deps.TextWrap]] -git-tree-sha1 = "43044b737fa70bc12f6105061d3da38f881a3e3c" -uuid = "b718987f-49a8-5099-9789-dcd902bef87d" -version = "1.0.2" - [[deps.ThreadingUtilities]] deps = ["ManualMemory"] git-tree-sha1 = "7c73336785b21f723f5b143f6e99cf6c43b37dc1" @@ -2609,12 +2269,6 @@ git-tree-sha1 = "4d4ed7f294cda19382ff7de4c137d24d16adc89b" uuid = "981d1d27-644d-49a2-9326-4793e63143c3" version = "0.1.0" -[[deps.URIParser]] -deps = ["Unicode"] -git-tree-sha1 = "53a9f49546b8d2dd2e688d216421d050c9a31d0d" -uuid = "30578b45-9adc-5946-b283-645ec420af67" -version = "0.4.1" - [[deps.URIs]] git-tree-sha1 = "bef26fb046d031353ef97a82e3fdb6afe7f21b1a" uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" @@ -2715,12 +2369,6 @@ git-tree-sha1 = "cd1659ba0d57b71a464a29e64dbc67cfe83d54e7" uuid = "76eceee3-57b5-4d4a-8e66-0e911cebbf60" version = "1.6.1" -[[deps.XML2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] -git-tree-sha1 = "80d3930c6347cfce7ccf96bd3bafdf079d9c0390" -uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -version = "2.13.9+0" - [[deps.XZ_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "b29c22e245d092b8b4e8d3c09ad7baa586d9f573" @@ -2751,24 +2399,12 @@ git-tree-sha1 = "aa1261ebbac3ccc8d16558ae6799524c450ed16b" uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" version = "1.0.13+0" -[[deps.Xorg_libXcomposite_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXfixes_jll"] -git-tree-sha1 = "025180ce2163cdd71ba6e5a227bd06cf203b559c" -uuid = "3c9796d7-64a0-5134-86ad-79f8eb684845" -version = "0.4.7+0" - [[deps.Xorg_libXcursor_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] git-tree-sha1 = "6c74ca84bbabc18c4547014765d194ff0b4dc9da" uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" version = "1.2.4+0" -[[deps.Xorg_libXdamage_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXfixes_jll"] -git-tree-sha1 = "45917154defafcbff585d6c04f323b5797da1ecf" -uuid = "0aeada51-83db-5f97-b67e-184615cfc6f6" -version = "1.1.7+0" - [[deps.Xorg_libXdmcp_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "52858d64353db33a56e13c341d7bf44cd0d7b309" @@ -2811,12 +2447,6 @@ git-tree-sha1 = "7ed9347888fac59a618302ee38216dd0379c480d" uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" version = "0.9.12+0" -[[deps.Xorg_libXtst_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXfixes_jll", "Xorg_libXi_jll"] -git-tree-sha1 = "58c2e8f49733034d33b461d45a7e874b4135b644" -uuid = "b6f176f1-7aea-5357-ad67-1d3e565ea1c6" -version = "1.2.5+0" - [[deps.Xorg_libpciaccess_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] git-tree-sha1 = "58972370b81423fc546c56a60ed1a009450177c3" @@ -2889,12 +2519,6 @@ git-tree-sha1 = "a63799ff68005991f9d9491b6e95bd3478d783cb" uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" version = "1.6.0+0" -[[deps.YAML]] -deps = ["Base64", "Dates", "Printf", "StringEncodings"] -git-tree-sha1 = "a1c0c7585346251353cddede21f180b96388c403" -uuid = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" -version = "0.4.16" - [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" @@ -2906,18 +2530,6 @@ git-tree-sha1 = "446b23e73536f84e8037f5dce465e92275f6a308" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" version = "1.5.7+1" -[[deps.at_spi2_atk_jll]] -deps = ["ATK_jll", "Artifacts", "JLLWrappers", "Libdl", "XML2_jll", "Xorg_libX11_jll", "at_spi2_core_jll"] -git-tree-sha1 = "249ab7c4da34d86d3d66b524705b1c07fe96b815" -uuid = "de012916-1e3f-58c2-8f29-df3ef51d412d" -version = "2.38.0+0" - -[[deps.at_spi2_core_jll]] -deps = ["Artifacts", "Dbus_jll", "Glib_jll", "JLLWrappers", "Libdl", "Xorg_libXtst_jll"] -git-tree-sha1 = "75a09aa217cbd6e81a8c337462a335ab78556bd7" -uuid = "0fc3237b-ac94-5853-b45c-d43d59a06200" -version = "2.60.3+0" - [[deps.eudev_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "c3b0e6196d50eab0c5ed34021aaa0bb463489510" @@ -2930,18 +2542,6 @@ git-tree-sha1 = "b6a34e0e0960190ac2a4363a1bd003504772d631" uuid = "214eeab7-80f7-51ab-84ad-2988db7cef09" version = "0.61.1+0" -[[deps.gdk_pixbuf_jll]] -deps = ["Artifacts", "Glib_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Xorg_libX11_jll", "libpng_jll"] -git-tree-sha1 = "895f21b699121d1a57ecac57e65a852caf569254" -uuid = "da03df04-f53b-5353-a52f-6a8b0620ced0" -version = "2.42.13+0" - -[[deps.iso_codes_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "6d3b2c8a4870c50f41bbd58131ed9af581c675b5" -uuid = "bf975903-5238-5d20-8243-bc370bc1e7e5" -version = "4.20.1+0" - [[deps.isoband_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "51b5eeb3f98367157a7a12a1fb0aa5328946c03c" diff --git a/environment/Project.toml b/environment/Project.toml index 92da1c1..fde398d 100644 --- a/environment/Project.toml +++ b/environment/Project.toml @@ -11,9 +11,6 @@ ContinuousWavelets = "96eb917e-2868-4417-9cb6-27e7ff17528f" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" -GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" -Genie = "c43c736e-a2d1-11e8-161f-af95117fbd1e" -GenieFramework = "a59fdf5c-6bf0-4f5d-949c-a137c9e2f353" HistogramThresholding = "2c695a8d-9458-5d45-9878-1b8a99cf7853" ImageBinarization = "cbc4b850-ae4b-5111-9e64-df94c024a13d" ImageComponentAnalysis = "d9b9e9a0-1569-11e9-2cb5-bbca914b0e89" @@ -30,11 +27,8 @@ Libz = "2ec943e9-cfe8-584d-b93d-64dcb6d567b7" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Loess = "4345ca2d-374a-55d4-8d30-97f9976e7612" Mmap = "a63ad114-7e13-5084-954f-fe012c677804" -NativeFileDialog = "e1fe445b-aa65-4df4-81c1-2041507f0fd4" NaturalSort = "c020b1a1-e9b0-503a-9c33-f039bfc54a85" -PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a" -PlotlyBase = "a03496cd-edff-5a9b-9e67-9cda94a718b5" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca" @@ -44,7 +38,5 @@ Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -StipplePlotly = "ec984513-233d-481d-95b0-a3b58b97af2b" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -julia_mzML_imzML = "38eb50d3-2fb6-4afa-992a-964ed8562ed9" diff --git a/run_full_pipeline.sh b/run_full_pipeline.sh index 07e87dc..aaef6dc 100755 --- a/run_full_pipeline.sh +++ b/run_full_pipeline.sh @@ -39,12 +39,23 @@ else [ -n "$name" ] && DATASETS+=("$name") done < <(for d in "$DATA_ROOT"/*/; do [ -d "$d" ] || continue - if ls "$d"*.imzML "$d"*.imzml >/dev/null 2>&1; then basename "$d"; fi + # Case-insensitive match (.imzML / .imzml / .IMZML); `find -iname` avoids the + # glob-pair pitfall where a non-matching pattern makes `ls` return non-zero. + if [ -n "$(find "$d" -maxdepth 1 -type f -iname '*.imzml' -print -quit 2>/dev/null)" ]; then + basename "$d" + fi done | sort) fi if [ "${#DATASETS[@]}" -eq 0 ]; then echo "ERROR: no datasets with an .imzML found under '$DATA_ROOT'." >&2 + echo " Each dataset must be in its own subfolder:" >&2 + echo " $DATA_ROOT//.imzML (+ .ibd)" >&2 + if [ -n "$(find "$DATA_ROOT" -maxdepth 1 -type f -iname '*.imzml' -print -quit 2>/dev/null)" ]; then + echo " Note: .imzML file(s) were found directly in '$DATA_ROOT' (loose files are ignored)." >&2 + echo " Move each into its own subfolder, e.g.:" >&2 + echo " mkdir -p $DATA_ROOT/ && mv $DATA_ROOT/*.imzML $DATA_ROOT/*.ibd $DATA_ROOT//" >&2 + fi exit 1 fi diff --git a/scripts_julia/graph_cluster_spectra.jl b/scripts_julia/graph_cluster_spectra.jl index d6f7ac0..1d8d31a 100644 --- a/scripts_julia/graph_cluster_spectra.jl +++ b/scripts_julia/graph_cluster_spectra.jl @@ -1,6 +1,6 @@ using Pkg script_dir = @__DIR__ -project_root = joinpath(script_dir, "..", "..") +project_root = joinpath(script_dir, "..") Pkg.activate(joinpath(project_root, "environment")) ENV["GKSwstype"] = "100" diff --git a/scripts_julia/julia_msi_bridge.jl b/scripts_julia/julia_msi_bridge.jl index b78b032..89ee967 100644 --- a/scripts_julia/julia_msi_bridge.jl +++ b/scripts_julia/julia_msi_bridge.jl @@ -1,6 +1,6 @@ using Pkg script_dir = @__DIR__ -project_root = joinpath(script_dir, "..", "..") +project_root = joinpath(script_dir, "..") Pkg.activate(joinpath(project_root, "environment")) @@ -8,7 +8,6 @@ push!(LOAD_PATH, joinpath(project_root, "src")) include(joinpath(project_root, "src", "MSI_src.jl")) using .MSI_src using Statistics, Images, Interpolations, BenchmarkTools -import julia_mzML_imzML data_dir = length(ARGS) >= 1 ? ARGS[1] : joinpath(project_root, "data") dataset_name = length(ARGS) >= 2 ? ARGS[2] : splitdir(data_dir)[2] @@ -24,7 +23,9 @@ data_path = joinpath(data_dir, imzml_files[1]) mask_path = joinpath(data_dir, "region_of_interest.png") if !isfile(mask_path) alt_masks = filter(f -> endswith(lowercase(f), ".png") && occursin(r"roi|mask|region", lowercase(f)), readdir(data_dir)) - mask_path = isempty(alt_masks) ? "" : joinpath(data_dir, alt_masks[1]) + # `nothing` (not "") means "no mask": MSI_src treats nothing as unmasked, whereas + # an empty string is interpreted as a path and errors in load_and_prepare_mask. + mask_path = isempty(alt_masks) ? nothing : joinpath(data_dir, alt_masks[1]) end output_folder = joinpath(project_root, "outputs", "ion_images", dataset_name) @@ -35,7 +36,7 @@ mkpath(viridis_folder) println("--- JULIA BATCH ENGINE: $dataset_name ---") println("Data: $data_path") -println("Mask: $(isempty(mask_path) ? "none" : mask_path)") +println("Mask: $(mask_path === nothing ? "none" : mask_path)") println("Output (grayscale): $output_folder") println("Output (viridis): $viridis_folder") @@ -43,7 +44,7 @@ println("--- JULIA BATCH ENGINE ---") # Apply Julia's native ViridisPalette (256-entry, 0xRRGGBB) to a 0..255 intensity map. function apply_viridis(intensity_matrix::AbstractMatrix{Float32}) - palette = julia_mzML_imzML.ViridisPalette + palette = MSI_src.ViridisPalette h, w = size(intensity_matrix) rgb = Matrix{RGB{N0f8}}(undef, h, w) @inbounds for j in 1:w, i in 1:h @@ -186,7 +187,7 @@ function run_production_pipeline() end println("Step 5+6: Batched Ion Extraction, TrIQ Normalization & 256x256 Zero-Padding...") - mask_matrix = MSI_src.load_and_prepare_mask(mask_path, (data.image_dims[1], data.image_dims[2])) + mask_matrix = mask_path === nothing ? nothing : MSI_src.load_and_prepare_mask(mask_path, (data.image_dims[1], data.image_dims[2])) exported_count = Threads.Atomic{Int}(0) target_size = (256, 256) diff --git a/scripts_julia/plot_mass_spectra.jl b/scripts_julia/plot_mass_spectra.jl index 90ea909..0adeb9b 100644 --- a/scripts_julia/plot_mass_spectra.jl +++ b/scripts_julia/plot_mass_spectra.jl @@ -1,6 +1,6 @@ using Pkg script_dir = @__DIR__ -project_root = joinpath(script_dir, "..", "..") +project_root = joinpath(script_dir, "..") Pkg.activate(joinpath(project_root, "environment")) ENV["GKSwstype"] = "100" @@ -28,7 +28,8 @@ data_path = joinpath(data_dir, imzml_files[1]) mask_path = joinpath(data_dir, "region_of_interest.png") if !isfile(mask_path) alt = filter(f -> endswith(lowercase(f), ".png") && occursin(r"roi|mask|region", lowercase(f)), readdir(data_dir)) - mask_path = isempty(alt) ? "" : joinpath(data_dir, alt[1]) + # `nothing` means "no mask" (see julia_msi_bridge.jl); "" would be treated as a path. + mask_path = isempty(alt) ? nothing : joinpath(data_dir, alt[1]) end println("Loading data: $data_path") @@ -52,7 +53,7 @@ if !isempty(bin_avg) # Apply the ROI mask (if present) so off-tissue pixels are excluded, matching # the masked get_average_spectrum path and the Stage 1 extraction policy. mask_mat = nothing - if mask_path != "" && isfile(mask_path) + if mask_path !== nothing && isfile(mask_path) mask_mat = MSI_src.load_and_prepare_mask(mask_path, data.image_dims) end for i in 1:size(data.imzml_data, 2) diff --git a/scripts_python/CNN_proof_1.py b/scripts_python/CNN_proof_1.py index 5690049..4e6a847 100644 --- a/scripts_python/CNN_proof_1.py +++ b/scripts_python/CNN_proof_1.py @@ -27,8 +27,8 @@ set_seed(42) dataset_name = sys.argv[1] if len(sys.argv) > 1 else "leaf" BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -IMG_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", "ion_images", dataset_name) -MODEL_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", "models", dataset_name) +IMG_DIR = os.path.join(BASE_DIR, "..", "outputs", "ion_images", dataset_name) +MODEL_DIR = os.path.join(BASE_DIR, "..", "outputs", "models", dataset_name) MODEL_SAVE_PATH = os.path.join(MODEL_DIR, "msi_encoder_trained.pth") BATCH_SIZE = 8 diff --git a/scripts_python/build_manuscript_figures.py b/scripts_python/build_manuscript_figures.py index c3d4bc6..56b8406 100644 --- a/scripts_python/build_manuscript_figures.py +++ b/scripts_python/build_manuscript_figures.py @@ -7,7 +7,7 @@ import matplotlib.pyplot as plt import matplotlib.cm as cm from PIL import Image, ImageDraw, ImageFont -ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BENCH_CSV = os.path.join(ROOT, "Benchmark_recommendation", "results", "cross_language_benchmark.csv") GAL = os.path.join(ROOT, "outputs") FONT = "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf" diff --git a/scripts_python/evaluate_clustering.py b/scripts_python/evaluate_clustering.py index 069765b..0721757 100644 --- a/scripts_python/evaluate_clustering.py +++ b/scripts_python/evaluate_clustering.py @@ -27,9 +27,9 @@ set_seed(42) dataset_name = sys.argv[1] if len(sys.argv) > 1 else "leaf" BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -IMG_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", "ion_images", dataset_name) -MODEL_PATH = os.path.join(BASE_DIR, "..", "..", "outputs", "models", dataset_name, "msi_encoder_trained.pth") -OUTPUT_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", dataset_name) +IMG_DIR = os.path.join(BASE_DIR, "..", "outputs", "ion_images", dataset_name) +MODEL_PATH = os.path.join(BASE_DIR, "..", "outputs", "models", dataset_name, "msi_encoder_trained.pth") +OUTPUT_DIR = os.path.join(BASE_DIR, "..", "outputs", dataset_name) FIGURES_DIR = os.path.join(OUTPUT_DIR, "figures") DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") K_RANGE = range(2, 21) # overridden per-dataset below to respect small corpora diff --git a/scripts_python/evaluate_clustering_k5.py b/scripts_python/evaluate_clustering_k5.py index 241e0ca..f57bb00 100644 --- a/scripts_python/evaluate_clustering_k5.py +++ b/scripts_python/evaluate_clustering_k5.py @@ -24,9 +24,9 @@ def set_seed(seed=42): set_seed(42) BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -IMG_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", "ion_images") -MODEL_PATH = os.path.join(BASE_DIR, "..", "..", "outputs", "models", "msi_encoder_trained.pth") -OUTPUT_DIR = os.path.join(BASE_DIR, "..", "..", "outputs_k5") +IMG_DIR = os.path.join(BASE_DIR, "..", "outputs", "ion_images") +MODEL_PATH = os.path.join(BASE_DIR, "..", "outputs", "models", "msi_encoder_trained.pth") +OUTPUT_DIR = os.path.join(BASE_DIR, "..", "outputs_k5") DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") K_RANGE = range(2, 21) diff --git a/scripts_python/graph_tsne_msi.py b/scripts_python/graph_tsne_msi.py index 6034db5..ac54bd7 100644 --- a/scripts_python/graph_tsne_msi.py +++ b/scripts_python/graph_tsne_msi.py @@ -30,9 +30,9 @@ dataset_name = sys.argv[1] if len(sys.argv) > 1 else "leaf" TARGET_K = int(sys.argv[2]) if len(sys.argv) > 2 else 10 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -IMG_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", "ion_images", dataset_name) -ENCODER_PATH = os.path.join(BASE_DIR, "..", "..", "outputs", "models", dataset_name, "msi_encoder_trained.pth") -OUTPUT_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", dataset_name) +IMG_DIR = os.path.join(BASE_DIR, "..", "outputs", "ion_images", dataset_name) +ENCODER_PATH = os.path.join(BASE_DIR, "..", "outputs", "models", dataset_name, "msi_encoder_trained.pth") +OUTPUT_DIR = os.path.join(BASE_DIR, "..", "outputs", dataset_name) FIGURES_DIR = os.path.join(OUTPUT_DIR, "figures") DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") @@ -128,7 +128,7 @@ if __name__ == "__main__": ) embeddings_2d = tsne.fit_transform(features_pca) - output_dir = os.path.join(BASE_DIR, "..", "..", "outputs", dataset_name) + output_dir = os.path.join(BASE_DIR, "..", "outputs", dataset_name) figures_dir = os.path.join(output_dir, "figures") os.makedirs(output_dir, exist_ok=True) os.makedirs(figures_dir, exist_ok=True) diff --git a/scripts_python/graph_tsne_msi_k5.py b/scripts_python/graph_tsne_msi_k5.py index 6529987..35ff1e7 100644 --- a/scripts_python/graph_tsne_msi_k5.py +++ b/scripts_python/graph_tsne_msi_k5.py @@ -25,8 +25,8 @@ def set_seed(seed=42): set_seed(42) BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -IMG_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", "ion_images") -ENCODER_PATH = os.path.join(BASE_DIR, "..", "..", "outputs", "models", "msi_encoder_trained.pth") +IMG_DIR = os.path.join(BASE_DIR, "..", "outputs", "ion_images") +ENCODER_PATH = os.path.join(BASE_DIR, "..", "outputs", "models", "msi_encoder_trained.pth") DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") TARGET_K = 5 @@ -121,7 +121,7 @@ if __name__ == "__main__": ) embeddings_2d = tsne.fit_transform(features_pca) - output_dir = os.path.join(BASE_DIR, "..", "..", "outputs_k5") + output_dir = os.path.join(BASE_DIR, "..", "outputs_k5") figures_dir = os.path.join(output_dir, "figures") os.makedirs(output_dir, exist_ok=True) os.makedirs(figures_dir, exist_ok=True) diff --git a/scripts_python/guided_vascular.py b/scripts_python/guided_vascular.py index 1bdf641..7c6ac94 100644 --- a/scripts_python/guided_vascular.py +++ b/scripts_python/guided_vascular.py @@ -9,9 +9,9 @@ import torch.nn.functional as F import matplotlib.pyplot as plt BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -IMG_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", "ion_images") -ENCODER_PATH = os.path.join(BASE_DIR, "..", "..", "outputs", "models", "msi_encoder_trained.pth") -OUTPUT_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", "figures", "guided_validation") +IMG_DIR = os.path.join(BASE_DIR, "..", "outputs", "ion_images") +ENCODER_PATH = os.path.join(BASE_DIR, "..", "outputs", "models", "msi_encoder_trained.pth") +OUTPUT_DIR = os.path.join(BASE_DIR, "..", "outputs", "figures", "guided_validation") os.makedirs(OUTPUT_DIR, exist_ok=True) DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") diff --git a/scripts_python/make_ion_carpet.py b/scripts_python/make_ion_carpet.py index 2ff79a1..be46423 100644 --- a/scripts_python/make_ion_carpet.py +++ b/scripts_python/make_ion_carpet.py @@ -107,7 +107,7 @@ def main(): help="dataset directory (default: /datos_para_ai/)") args = ap.parse_args() - root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) dataset_dir = args.data_dir or os.path.join(root, "datos_para_ai", args.dataset) viridis_dir = os.path.join(root, "outputs", "ion_images_viridis", args.dataset) ions = load_ions(viridis_dir, args.tile_size, args.dataset) diff --git a/scripts_python/msi_preprocess_python.py b/scripts_python/msi_preprocess_python.py index 1494e4a..95fd186 100644 --- a/scripts_python/msi_preprocess_python.py +++ b/scripts_python/msi_preprocess_python.py @@ -6,7 +6,7 @@ import xml.etree.ElementTree as ET import numpy as np from PIL import Image -PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")) +PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) TOLERANCE = 0.05 TARGET_SIZE = (256, 256) diff --git a/scripts_python/plot_mass_spectra_python.py b/scripts_python/plot_mass_spectra_python.py index f0562b3..c5470da 100644 --- a/scripts_python/plot_mass_spectra_python.py +++ b/scripts_python/plot_mass_spectra_python.py @@ -7,7 +7,7 @@ matplotlib.use('Agg') import matplotlib.pyplot as plt from PIL import Image -PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")) +PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from msi_preprocess_python import parse_imzml, compute_average_spectrum, load_mask, configure, find_mask_path diff --git a/scripts_python/quantitative_validation.py b/scripts_python/quantitative_validation.py index 37184cf..d74c454 100644 --- a/scripts_python/quantitative_validation.py +++ b/scripts_python/quantitative_validation.py @@ -30,9 +30,9 @@ dataset_name = sys.argv[1] if len(sys.argv) > 1 else "leaf" K = int(sys.argv[2]) if len(sys.argv) > 2 else 10 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -IMG_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", "ion_images", dataset_name) -MODEL_PATH = os.path.join(BASE_DIR, "..", "..", "outputs", "models", dataset_name, "msi_encoder_trained.pth") -OUTPUT_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", dataset_name) +IMG_DIR = os.path.join(BASE_DIR, "..", "outputs", "ion_images", dataset_name) +MODEL_PATH = os.path.join(BASE_DIR, "..", "outputs", "models", dataset_name, "msi_encoder_trained.pth") +OUTPUT_DIR = os.path.join(BASE_DIR, "..", "outputs", dataset_name) FIGURES_DIR = os.path.join(OUTPUT_DIR, "figures") DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") diff --git a/scripts_python/quantitative_validation_k5.py b/scripts_python/quantitative_validation_k5.py index 19f3fb9..4f02c55 100644 --- a/scripts_python/quantitative_validation_k5.py +++ b/scripts_python/quantitative_validation_k5.py @@ -26,9 +26,9 @@ def set_seed(seed=42): set_seed(42) BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -IMG_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", "ion_images") -MODEL_PATH = os.path.join(BASE_DIR, "..", "..", "outputs", "models", "msi_encoder_trained.pth") -OUTPUT_DIR = os.path.join(BASE_DIR, "..", "..", "outputs_k5") +IMG_DIR = os.path.join(BASE_DIR, "..", "outputs", "ion_images") +MODEL_PATH = os.path.join(BASE_DIR, "..", "outputs", "models", "msi_encoder_trained.pth") +OUTPUT_DIR = os.path.join(BASE_DIR, "..", "outputs_k5") DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") K = 5 diff --git a/scripts_python/test_grouping.py b/scripts_python/test_grouping.py index 20157ef..35b07eb 100644 --- a/scripts_python/test_grouping.py +++ b/scripts_python/test_grouping.py @@ -9,8 +9,8 @@ from sklearn.cluster import KMeans import torch.nn.functional as F BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -IMG_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", "ion_images") -ENCODER_PATH = os.path.join(BASE_DIR, "..", "..", "outputs", "models", "msi_encoder_trained.pth") +IMG_DIR = os.path.join(BASE_DIR, "..", "outputs", "ion_images") +ENCODER_PATH = os.path.join(BASE_DIR, "..", "outputs", "models", "msi_encoder_trained.pth") DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") class MSI_Structural_Encoder(nn.Module): diff --git a/scripts_python/verify_coherence.py b/scripts_python/verify_coherence.py index 75a8519..d7f37ac 100644 --- a/scripts_python/verify_coherence.py +++ b/scripts_python/verify_coherence.py @@ -8,8 +8,8 @@ from torchvision import transforms import torch.nn as nn BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -IMG_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", "ion_images") -MODEL_PATH = os.path.join(BASE_DIR, "..", "..", "outputs", "models", "msi_encoder_trained.pth") +IMG_DIR = os.path.join(BASE_DIR, "..", "outputs", "ion_images") +MODEL_PATH = os.path.join(BASE_DIR, "..", "outputs", "models", "msi_encoder_trained.pth") class MSI_Structural_Encoder(nn.Module): def __init__(self): diff --git a/scripts_python/visualize_clusters.py b/scripts_python/visualize_clusters.py index 5d2876e..3e359a4 100644 --- a/scripts_python/visualize_clusters.py +++ b/scripts_python/visualize_clusters.py @@ -7,9 +7,9 @@ from PIL import Image dataset_name = sys.argv[1] if len(sys.argv) > 1 else "leaf" BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -CSV_PATH = os.path.join(BASE_DIR, "..", "..", "outputs", dataset_name, "msi_clusters_results.csv") -IMG_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", "ion_images", dataset_name) -OUTPUT_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", dataset_name, "galleries") +CSV_PATH = os.path.join(BASE_DIR, "..", "outputs", dataset_name, "msi_clusters_results.csv") +IMG_DIR = os.path.join(BASE_DIR, "..", "outputs", "ion_images", dataset_name) +OUTPUT_DIR = os.path.join(BASE_DIR, "..", "outputs", dataset_name, "galleries") os.makedirs(OUTPUT_DIR, exist_ok=True) if os.path.exists(CSV_PATH): diff --git a/scripts_python/visualize_clusters_k5.py b/scripts_python/visualize_clusters_k5.py index 2ee37c0..9a66f36 100644 --- a/scripts_python/visualize_clusters_k5.py +++ b/scripts_python/visualize_clusters_k5.py @@ -4,9 +4,9 @@ import matplotlib.pyplot as plt from PIL import Image BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -CSV_PATH = os.path.join(BASE_DIR, "..", "..", "outputs_k5", "msi_clusters_results.csv") -IMG_DIR = os.path.join(BASE_DIR, "..", "..", "outputs", "ion_images") -OUTPUT_DIR = os.path.join(BASE_DIR, "..", "..", "outputs_k5", "figures", "galleries") +CSV_PATH = os.path.join(BASE_DIR, "..", "outputs_k5", "msi_clusters_results.csv") +IMG_DIR = os.path.join(BASE_DIR, "..", "outputs", "ion_images") +OUTPUT_DIR = os.path.join(BASE_DIR, "..", "outputs_k5", "figures", "galleries") os.makedirs(OUTPUT_DIR, exist_ok=True) if os.path.exists(CSV_PATH):