Adjusted all working routes, full docker pipeline verified, added extra validations for docker, reduced julia environment, tested run succesful
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user