Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Tutorial 5: Stitching only

When to use

You want illumination-corrected, stitched and registered images, and nothing after: no segmentation, quantification or QC report. Ashlar’s own stitching QC is still written. The example below is made up; adapt it to your slides.

The samplesheet

One row per cycle; two slides here:

samplecycle_numberimage_tilesmarker_sheet
slide011/data/myproject/raw/slide01/cycle01.ome.tiff/data/myproject/sheets/markers.csv
slide012/data/myproject/raw/slide01/cycle02.ome.tiff/data/myproject/sheets/markers.csv
slide021/data/myproject/raw/slide02/cycle01.ome.tiff/data/myproject/sheets/markers.csv
slide022/data/myproject/raw/slide02/cycle02.ome.tiff/data/myproject/sheets/markers.csv
Copy as CSV: samplesheet.csv
sample,cycle_number,image_tiles,marker_sheet
slide01,1,/data/myproject/raw/slide01/cycle01.ome.tiff,/data/myproject/sheets/markers.csv
slide01,2,/data/myproject/raw/slide01/cycle02.ome.tiff,/data/myproject/sheets/markers.csv
slide02,1,/data/myproject/raw/slide02/cycle01.ome.tiff,/data/myproject/sheets/markers.csv
slide02,2,/data/myproject/raw/slide02/cycle02.ome.tiff,/data/myproject/sheets/markers.csv

The marker sheet

channel_numbercycle_numbermarker_namechannel_rolechannel_compartmentfilter
11DNA_1dnanuclearDAPI
21CD45markermembraneFITC
31PanCKmarkercytoplasmCy5
42DNA_2dnanuclearDAPI
52CD3markermembraneFITC
62CD68markercytoplasmCy5
Copy as CSV: markers.csv
channel_number,cycle_number,marker_name,channel_role,channel_compartment,filter
1,1,DNA_1,dna,nuclear,DAPI
2,1,CD45,marker,membrane,FITC
3,1,PanCK,marker,cytoplasm,Cy5
4,2,DNA_2,dna,nuclear,DAPI
5,2,CD3,marker,membrane,FITC
6,2,CD68,marker,cytoplasm,Cy5

The marker sheet is still required and checked. Ashlar aligns every cycle on the same position within the cycle, and the run stops at the start unless that channel is dna. Columns: The marker sheet.

The parameters

Save as params.yml:

input: /data/myproject/sheets/samplesheet.csv
outdir: /data/myproject/results

preprocessing_only: true

Run

nextflow run CosciaLab/histo -r v3.2.0 \
    -profile singularity,size_small,slurm \
    -params-file params.yml

See Running on the cluster.

What you get

results/
├── preprocessing/
│   ├── illumination/   slide01_cycle1-dfp.ome.tif, -ffp.ome.tif; per cycle
│   └── registration/   slide01.ome.tif, slide01_ashlar_qc/, slide02.ome.tif, slide02_ashlar_qc/
└── pipeline_info/

Ashlar writes no channel names, so the channels in these images are unnamed. Every file: Preprocessing outputs.

What to check

There is no HTML report.

  1. preprocessing/registration/slide01_ashlar_qc/slide01_ashlar_report.pdf: per-tile maps.

  2. overlay_cycleN.jpg in the same folder: cycle 1 in magenta over a later cycle in green. Where they line up the two colours add to white; magenta and green fringes mean an offset.

  3. slide01.ome.tif in a viewer; see Viewers.

Misaligned? See When stitching looks wrong. This route is the fastest way to try new Ashlar settings.