Skip to content

Tutorial

Suman edited this page Aug 3, 2026 · 8 revisions

This walkthrough takes you from a clean folder to a finished FusionX report with the public tutorial dataset. It covers two small experiments (Exp1 and Exp2), so you can check your installation from start to finish before you point FusionX at your own images.

Dataset: FusionX tutorial dataset, 10.5281/zenodo.19129303 (CC BY 4.0, 3.3 MB).

You type everything below into a terminal. The way you open one, and which one you open, depends on your operating system. Start here, then keep the same window open for the rest of the tutorial.

Use the Anaconda Prompt, not Command Prompt or PowerShell.

  1. Press the Windows key and type Anaconda Prompt.

  2. Open Anaconda Prompt (miniconda3), or (anaconda3) if that is what you installed.

A window opens with (base) at the start of the line. That prefix means conda is active, which is what makes the FusionX environment reachable. In a plain Command Prompt or PowerShell window, conda is usually not on the path, so every command below fails with “not recognized as an internal or external command”.

Open Terminal. Press Cmd and Space, type Terminal, then press Enter. It also lives in Applications ▸ Utilities.

If your prompt does not show (base), conda was installed without shell initialisation. Activate it by hand, and adjust the path to match your install:

source ~/miniconda3/bin/activate

Open a terminal.

Whichever system you are on, run:

conda --version

If it prints a version number, you are ready. If it reports that the command was not found, conda is not installed or not initialised. See Installation.

  1. Open the record page: zenodo.org/records/19129303.

  2. Scroll to the Files list. It holds four TIFFs: Exp1_membrane.tif, Exp1_nuclei.tif, Exp2_membrane.tif, and Exp2_nuclei.tif.

  3. Click Download on each one, or use Download all to get them in a single zip.

  4. Make a new folder called fusionx_tutorial somewhere easy to reach. Your Documents folder or Desktop works well.

  5. Move all four TIFFs into that folder. If you downloaded the zip, extract it there first and make sure the TIFFs sit directly inside fusionx_tutorial, not in an extra subfolder.

  6. Copy the folder’s full path. You use it in section 4. On Windows, click the File Explorer address bar. On macOS, hold Option, right click the folder, then choose Copy as Pathname. On Linux, press Ctrl and L.

Your fusionx_tutorial folder should now hold these four files and nothing else:

The fusionx_tutorial folder holding the four TIFF files

Leave the filenames exactly as they are. The next section explains why.

FusionX does not take input paths as arguments. It scans the directory you launch it from for .tif files and pairs them by name:

  • A file that ends in _membrane.tif is the membrane or boundary channel, for example Exp1_membrane.tif.

  • A file that ends in _nuclei.tif is the nuclei channel, for example Exp1_nuclei.tif.

Everything before _membrane or _nuclei becomes the experiment name, so the sample data gives you two experiments: Exp1 and Exp2.

Three rules follow from this, and they cause most of the problems people hit on a first run:

  • Both halves are required. FusionX skips any experiment that has only a membrane file or only a nuclei file.

  • The suffixes are exact and case sensitive. FusionX does not pick up Exp1_Nuclei.tif or Exp1_nucleus.tif.

  • Only the current directory is scanned. FusionX ignores subfolders.

Four short commands: activate the environment you created during installation, move into the data folder, check that you are in the right place, then launch.

Step 1: activate the environment.

conda activate fusionx

Your prompt should now start with (fusionx) instead of (base). Running FusionX outside that environment is the most common setup problem, because Cellpose and the CellX weights are visible only from inside it.

Step 2: change into the data folder, using the path you copied in section 2. Paste it after cd. In Anaconda Prompt, a right click pastes.

Windows

cd /d "C:\Users\suman\Documents\fusionx_tutorial"

macOS and Linux

cd ~/Documents/fusionx_tutorial

On Windows, you need the /d flag if the folder sits on a different drive from the one the prompt opened on, and the quotes matter if any part of the path contains a space.

Step 3: confirm you landed in the right place. This should list four .tif files.

Windows

dir *.tif

macOS and Linux

ls *.tif

Terminal listing the four TIFF files

If nothing is listed, you are in the wrong folder. FusionX looks only at the directory you launch it from, so fix this before you go further.

Step 4: launch.

fusionx

Typing fusionx at the (fusionx) prompt

FusionX clears the terminal and prints one line per stage until it finishes:

A finished FusionX run in the terminal

Number of experiment in this path: 2 confirms that FusionX found both experiments. If it says 1, stop and check the filenames.

Timings depend a lot on your hardware. Cell segmentation and nuclei recovery take most of the runtime, and both run much faster on a GPU.

Want a faster first run? Move the Exp2_*.tif files into a subfolder before you launch. FusionX then processes Exp1 only, and you can move them back later.

After the run, the working directory looks like this:

fusionx_tutorial/
├── analysis_Exp1/                      # Exp1 outputs
│   ├── Exp1_cell_instances.tif         # cell instance labels
│   ├── Exp1_cell_nuclei_count.parquet  # one row per cell and nucleus pair
│   ├── Exp1_membrane.tif               # preprocessed copy used by the pipeline
│   ├── Exp1_nuclei.tif                 # preprocessed copy used by the pipeline
│   └── Exp1_nuclei_instances_COM.tif   # nuclei instance labels
├── analysis_Exp2/                      # Exp2 outputs (same five files)
├── Exp1_FusionX_report.csv             # main result
├── Exp1_membrane.tif                   # your inputs, untouched
├── Exp1_nuclei.tif                     # your inputs, untouched
├── Exp2_FusionX_report.csv             # main result
├── Exp2_membrane.tif                   # your inputs, untouched
├── Exp2_nuclei.tif                     # your inputs, untouched
└── output.log                          # full run log

The fusionx_tutorial folder after a run

Each analysis_ subfolder holds the outputs for one experiment:

Contents of the analysis_Exp2 subfolder

Exp2_FusionX_report.csv reports 69 cells and 97 nuclei: 58 mononucleated cells, 4 binucleated, 2 with 3 nuclei, 2 with 4, 2 with 5, and one cell with 7. Here is that report opened in a spreadsheet, with the two blocks side by side and the two empty separator columns between them:

Exp2 report in a spreadsheet, two blocks separated by empty columns

  • The two blocks have different lengths. The left block ends at TOTAL. The right block keeps going for one row per cell, which is 33 rows for Exp1 and 69 for Exp2, so the cells on the left are blank below the total.

  • Cell IDs are not always consecutive. Exp2 runs from 1 to 71 with gaps, because FusionX drops some candidate cells during validation.

Open the outputs in Fiji or napari to see what the numbers correspond to.

Cell instances. Exp2_cell_instances.tif draws each cell with its own label value. Load it on top of Exp2_membrane.tif and colour it with a random LUT (in Fiji: Image ▸ Lookup Tables ▸ glasbey) to check that FusionX captures syncytia as single objects instead of splitting them apart.

Segmented cells, each drawn in its own colour

Nuclei instances. Exp2_nuclei_instances_COM.tif holds the nuclei instances, with a marker at the centre of mass of each nucleus. It helps you check that Cellpose found roughly the right number of nuclei.

Nuclei channel with a coloured marker on each nucleus

Unassigned nuclei. Exp2_unassigned_nuclei.tif holds the nuclei that never made it into a cell. A handful is normal, but a dense field of them means the membrane segmentation underperformed on that image.

FusionX logs every stage of the run in detail to output.log, in the same folder you launched it from. The console shows only the headline progress lines, so that file is the place to look when a run behaves unexpectedly. Search it for ERROR, and the first hit is usually the real cause.

FusionX overwrites output.log on every run, so copy it aside before you run again. If you open an issue, attach it along with the command you ran.

Go back to Home.

Clone this wiki locally