Repository navigation
fix(scripts): update debug_track.py to the current track API - #463
Draft
tayllatheodoro wants to merge 2 commits into
Draft
tayllatheodoro wants to merge 2 commits into
tayllatheodoro wants to merge 2 commits into
Conversation
debug_track.py failed at import after #424 removed resolve_z_slice, and its config used keys TrackingSettings now rejects (z_range, mode) and a stale function key (biahub.cli.track.mem_nuc_contour). - import from biahub.tracking (#454) and call run_ultrack with keywords - use segmentation_method: foreground_contour and output_mode - project a 3D FOV in memory with the biahub project API (focus search plus per-channel projection), defaulting to the A549 project.yml window; a Z=1 store is tracked as is - match the blank-frames CSV with the B/1/000000 FOV form, as track does - fix the mem_nuc_contour key here and in example_track_settings.yml Closes #458
- show 3D tracks with their z column and a (1, *scale) scale, so they line up with the (T, Z, Y, X) layers instead of putting time on Z - read the focus channel from focus_store_path when input_images[0] lacks it (a virtual-stain store has no Phase3D), and find the focus once - project every input_images entry with a path, as biahub track loads them - cast projections to float32 when any channel is mean/sum, as biahub project - import napari only for the viewer, so spawned focus workers skip it - fix the contradictory input-path comment and leftover typos - update the track-with-biahub evaluation note about the script
tayllatheodoro
marked this pull request as draft
November 6, 2026 23:32
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #458.
scripts/debug_track.pystopped working when #424 removedresolve_z_slice, and it had other problems too:resolve_z_sliceno longer exists, so the script failed with anImportErrorat startup.TrackingSettingsforbids unknown keys, so the oldz_rangeandmodewould have been rejected.biahub.cli.track.mem_nuc_contourisn't inCUSTOM_FUNCTIONS. The same stale key was also insettings/example_track_settings.yml.Changes
biahub.tracking(refactor(track): move the tracking library code into biahub/tracking #454) and callrun_ultrackwith keyword arguments (detection=,edges=,scale=).segmentation_method: foreground_contourandoutput_mode.biahub projectAPI (no CLI, no output store).find_focus()wraps_find_focus_per_t, andproject_fov()callsresolve_z_indices/project_zyxper channel.nextflow/configs/a549/project.yml: a mean over 60 planes starting 20 below the Phase3D focus, found per timepoint.Phase3D, so the newfocus_store_pathlets the focus channel come from another plate. Without it, the script gives a clear error.biahub project: everyinput_imagesentry with a path is projected, and the output is float32 when any channel uses mean/sum.zcolumn and uses a(1, *scale)scale, so tracks line up with the (T, Z, Y, X) layers.B/1/000000FOV form, the same waytrackdoes.mem_nuc_contourkey in the script and inexample_track_settings.yml, plus some leftover typos. napari is now only imported when the viewer opens.track-with-biahubskill (references/evaluation.md).Testing
On synthetic plates (T=4, Z=70;
nuclei_prediction,membrane_prediction,Phase3D):Phase3Din another, the projection gives the same values asbiahub project(project(..., cluster="debug")) on the combined plate. Without a focus store, the missingPhase3Draises a clear error.focus) equalsmeanover Z.(1, *scale).napari.run()itself wasn't run.Note: the script uses
_find_focus_per_tand_FLOAT_METHODS, which are private tobiahub/project.py, so it will need updating if they change.