Analysis Tab

The Analysis tab lets you compare sample medians and IQRs across merged traces, fit models per sample, and inspect fit quality and parameter distributions. Data is precomputed in one step, then explored across Compare, Fit, and Results views.

Prerequisites

  1. Workspace – Set and validated on the landing page (folder containing traces_merged/).

  2. Time mapping CSV – Path to a CSV mapping frame indices to time (e.g. frame,time). Required for fitting.

  3. Processing and merge must be complete. The workspace path should point at a run directory that contains traces_merged/ with feature subfolders (e.g. intensity_total_ch_1/, area_ch_0/).

Workflow Overview

  1. Analysis Setup – Set workspace and time mapping path, run Compare and Fit precompute.

  2. See Results – Open Compare/Fit views from the precomputed payload.

  3. Compare – View sample medians and IQR envelopes by feature.

  4. Fit – Run or load per-sample fits, inspect quality and parameters.

  5. Results – Compare samples and parameter distributions.

Step-by-Step Guide

1. Analysis Setup

  1. Open the Analysis tab (or /app/analysis).

  2. Time Mapping (Required): Enter the path to a CSV with frame,time columns, or click Browse to select it.

  3. Workspace: Uses the workspace path from the landing page. It must contain traces_merged/ with feature subfolders.

  4. Click Compare and Fit to run the precompute. This calls the backend to:

    • Compare features across samples (median + IQR)

    • Fit all samples with the maturation model (or configured model)

  5. When done, click See Results to open the Results page.

2. Compare View

From Compare (or Open Compare on the Fit page):

  • Feature – Select which feature to compare (e.g. intensity_total_ch_1).

  • Samples – Toggle sample visibility; use All / None for quick changes.

  • Median + IQR – Plot shows median lines and IQR bands per sample.

3. Fit View

From Fit (or via the Fit tab on Results):

  • Feature – Choose the feature to fit.

  • Sample – Choose the sample.

  • Model – Select the fitting model (e.g. maturation, trivial, maturation_blocked).

  • Parameters – Edit fixed parameters, fit parameters, and bounds.

  • Run Fit – Run fitting for the selected feature/sample/model.

  • Load Saved – Load previously saved fit results.

  • Overwrite Fit – Re-run and overwrite saved results.

Results panel (after Run Fit or Load Saved):

  • Quality bar chart: good / fair / poor fractions.

  • Parameter histograms for successful fits.

4. Results View

The Results page has two tabs:

Compare tab:

  • Feature selector and sample visibility toggles.

  • Median + IQR plot for the selected feature.

Fit tab:

  • Sample A / Sample B – Choose two samples to compare.

  • Quality bar chart comparing the two samples.

  • Parameter histograms overlaid for both samples.

Models

  • trivial – Constant model for testing.

  • maturation – Exponential maturation: (f(t) = A \cdot (1 - e^{-kt}) + B).

  • maturation_blocked – Blocked maturation: (f(t) = A \cdot e^{-kt} + B).

Data Flow

  1. Setup runs compareFitMerged on the backend (compare + fit precompute).

  2. The response includes comparison data (medians, IQRs) and fit results by feature/sample.

  3. Compare, Fit, and Results all work from this precomputed payload.

  4. Fit can run additional fits (Run Fit, Overwrite Fit) or load saved fits via the API.

Tips

  • Time mapping is required for fitting. Use a CSV with frame,time rows.

  • Workspace should be the run directory (parent of traces_merged/). If the path ends with traces_merged, it is resolved to the parent.

  • After changing workspace or time mapping, run Compare and Fit again before opening Results.

Troubleshooting

“Time mapping CSV is required”

  • Provide a path to a CSV with frame and time columns.

“Analysis data is not loaded”

  • Go to Analysis Setup, set the paths, and click Compare and Fit before opening Compare, Fit, or Results.

“No samples found for this feature”

  • Check that traces_merged/ contains the expected feature subfolders.

  • Ensure merge was run successfully and sample names match the backend output.

Precompute failures

  • Check backend logs and that the run directory structure matches what the API expects.

Next Steps

  • Use Compare to identify features and samples of interest.

  • Use Fit to refine model parameters and bounds.

  • Export plots or parameters from the UI as needed (e.g. via browser or screenshots).