Skip to content

AVITI24 cytoprofiling support - #46

Open
mcmero wants to merge 25 commits into
devfrom
aviti
Open

mcmero wants to merge 25 commits into
devfrom
aviti

Conversation

@mcmero

@mcmero mcmero commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Support for segmentation of AVITI24 Cytoprofiling (Teton/Teton Atlas) data.

  • Input is done via a separate AVITI-specific sample sheet due to the different structure of runs (one run contains many tiled tiffs that are run in parallel and then stitched together).
  • As with the re-segmentation references provided by Elembio, the user can segment using cpsam or cellpose 3.x with specific membrane models (user can download Elembio's models and use them here).
  • Segmentation is done per-tile with no sub-tiling. Tiles are stitched into wells and run through cellmeasurement and the segmentation report. Optionally, the wells can also be stitched into the plate layout used by Elembio in Cytocanvas. The output TIFF is pyramidal and should be viewable in QuPath etc. The segmentations are also stitched although I think QuPath will probably crash when trying to load these.
  • Users can run a subset of wells, as well as specify a different segmentation model per well. This allows users to perform a 'sweep' by running N different models on the same well or set of wells, generate a report for each segmentation and compare these to select the best model before running the whole plate.
  • Almost all params specific to the AVITI are in their own aviti_ group -- I thought about consolidating them but in the end this was too confusing and having them separate is best.
  • This is preliminary support for AVITI. The methodology may change given ElemBio's updates or given new results.

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

mikemcka and others added 18 commits June 29, 2026 14:49
cellSAM previously received only the first matching membrane channel
(first-match-and-break in extract_channels), silently discarding any
additional markers. Wire COMBINECHANNELS into the CELLSAM_SEGMENT
subworkflow (mirroring the SOPA/Cellpose path) so all listed membrane
markers are max-combined into a single 'combined_membrane' channel
before segmentation. The background-subtraction variant inherits the
fix via its call to CELLSAM_SEGMENT.

Because cellSAM now only sees the single combined channel, log which
channels were combined in combine_channels.py so that information stays
visible in the process log.

Add multi-membrane nf-test cases to the combinechannels module and the
cellsam_segment subworkflow (reusing synthetic_multichannel.tif with
CD45:TRITC). Snapshots still need blessing on a GPU node; the existing
cellsam_segment / cellsam_segment_wbacksub snapshots also change because
COMBINECHANNELS now runs within those workflows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nnels

Fix/cellsam combine membrane channels
Add AVITI run discovery, channel merging, dual Cellpose whole-cell and nuclear segmentation, Cytocanvas-compatible tile masks, and per-well stitched outputs for downstream analysis.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fix per-well tile placement in aviti_stitch.py to use a Cytocanvas-orientated grid (reverse-ranked stage X for rows, ranked stage Y for columns) with a fixed visual gap between tiles, instead of a literal stage-coordinate pixel conversion that produced oversized/non-uniform gaps and a 90-degree rotated layout.

Add a configurable aviti_tile_gap_microns parameter (default 32um) threaded through nextflow.config, nextflow_schema.json, and conf/modules.config. Set nuclear mask dtype to uint8 and whole-cell mask dtype to uint16 in the per-tile segmentation scripts to match Elembio's cells2stats bit-depth expectations. Update tests/python/test_aviti_stitch.py to cover the corrected grid placement.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Elembio documents Nuclear.tif as a uint8 binary presence mask (0 = no
nucleus, 1 = nucleus present), unlike Cell.tif which is uint16
instance-labeled. We were treating it as instance-labeled too.

- aviti_nuclear_segment.py: filter small objects on the raw instance
  labels, then binarize to uint8 0/1 as the final step.
- aviti_stitch.py: add a binary=True mode to stitch_masks() so the
  nuclear canvas is composited as plain 0/1 (no running-label offset),
  since Nuclear.tif has no per-tile instance IDs to keep unique.
- conf/aviti_defaults.config: default cellpose_min_area to 0 (disabled)
  for now -- small-object filtering leaves gaps in whole-cell label IDs
  (relabel_contiguous was prototyped but pulled back out, since we
  haven't confirmed label gaps are actually what's segfaulting
  cells2stats, and want to isolate the binary Nuclear.tif fix first).
- Add/update unit tests covering remove_small_cells, binarize, and the
  new binary stitching mode.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Nuclear.tif (Elembio's binary 0/1 viewer/cells2stats convention) can't
carry per-nucleus instance IDs, but CELLMEASUREMENT needs them to match
nuclei to whole cells by centroid. AVITINUCLEARSEGMENT now writes both
from the same segmentation pass:

- Nuclear.tif: unchanged, binary, published under CellSegmentation/.
- Nuclear_label.tif: new, uint16 instance-labeled, internal-only
  (unpublished) intermediate.

AVITISTITCHWELL/CELLMEASUREMENT now consume the label mask instead of
the binary one. aviti_stitch.py's stitch_masks() reverts to its
original single (label-based) mode, since it no longer needs to
composite a binary mask.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AVITI whole-cell segmentation previously always used Cellpose v4
segment-anything (cpsam_v2). Elembio also ships several pretrained
Cellpose 3.x membrane models, and the right one depends on cell type,
so add a per-samplesheet-row choice between the two.

- New optional `membrane_model` samplesheet column (a model name, not
  a list). Blank keeps the existing v4 SAM path unchanged. Comparing
  models on the same run directory is one samplesheet row per model
  (same run_dir/wells, distinct sample names) -- there is no
  in-pipeline fan-out, so tile discovery/nuclear segmentation simply
  re-run once per row.
- New optional per-row `cell_diameter` column, overriding the global
  whole-cell/membrane diameter for that row only.
- New AVITIMEMBRANESEGMENT module, reusing AVITINUCLEARSEGMENT's
  Cellpose 3.0.7/torch environment (Cellpose v4 and 3.x cannot share
  one) rather than adding a third container.
- bin/aviti_nuclear_segment.py renamed to bin/aviti_cellpose3_segment.py
  and gains --mode {nuclear,membrane}. Membrane mode stacks channels
  as [cell, nucleus[, actin]] -- a different order from the v4 SAM
  path's independently-built [nucleus, membrane[, actin]] stack -- and
  matches the composite's channel count to whatever the selected
  model checkpoint was trained with (Elembio ships a 2ch and a 3ch
  model per cell type), padding/dropping the actin plane with a
  warning on a mismatch.
- Model resolution moves from a single required path
  (aviti_nuclear_model_path) to name-based lookup: aviti_models_dir
  is a shared directory, and both aviti_nuclear_model (default
  20250212_cellpose_nuc_8diam) and each row's membrane_model resolve
  under it. Validated up front in PIPELINE_INITIALISATION so a bad
  model name fails before any tile task runs.
- AVITI Cellpose tuning moves to its own aviti_* namespace, split per
  segmentation stage where structure size differs: aviti_nuclear_min_area
  defaults to 0 (separate from aviti_cellpose_min_area's 200, which
  would otherwise discard every ~50px^2 nucleus).

Tests: python unit tests for build_membrane_stack/reconcile_membrane_stack/
model_input_channels, an nf-test for AVITIMEMBRANESEGMENT (stub, 2ch/3ch),
and a new AVITI_SEGMENT subworkflow nf-test covering the branch/mix/join
routing for blank vs. set membrane_model in one run.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…oJSON

Every well's stitched output for a sample can now additionally be combined
into one plate-level view, viewable as a whole run in QuPath -- additive to
the existing per-well outputs, which are unaffected.

- New `aviti_plate_assembly` param (default true) drives two new streaming
  scripts/modules:
  - bin/aviti_assemble_plate_image.py (AVITIASSEMBLEPLATE): streams a
    tiled, pyramidal BigTIFF OME-TIFF from memory-mapped per-well images,
    so the full plate canvas (tens of GB uncompressed) is never held in
    memory. Wells are placed on a plate grid derived purely from their
    WellLocation id (letter = column, number = row -- not the standard
    microplate convention, but how these runs are laid out); also emits a
    small overview image and the layout CSV both plate artefacts share.
  - bin/aviti_merge_plate_geojson.py (AVITIMERGEPLATEGEOJSON): streams
    (never json.load()s) each well's cellmeasurement GeoJSON, translating
    every cell into plate coordinates and offsetting the three colliding
    id namespaces (properties.id, nucleus_label, whole_cell_label)
    independently so every cell stays unique across the plate, plus one
    labelled rectangle annotation per well.
  - bin/aviti_plate_common.py holds the shared layout math both scripts
    use, so the image and GeoJSON always place wells identically.
- subworkflows/local/aviti_segment/main.nf: new plate_image/plate_layout/
  plate_annotations emits, keyed on a distinct "<sample>__plate" meta --
  the existing well-scoped annotations/kronos_input emits (which the
  top-level KRONOS2EMBEDDINGS join depends on) are untouched.
  SEGMENTATIONREPORT now branches per sample: a row that restricts `wells`
  still gets per-well reports; a row covering the whole run gets one
  plate-level report instead (aviti_plate_report, fed the full-resolution
  plate image so it shares one pixel frame with the plate GeoJSON).
- Fixed a latent bug found along the way: AVITI pixel size was read from
  the global `pixel_size_microns` default (0.25) rather than the run's own
  RunParameters.json `ImageInfo.PixelSizeUm`, so stitching gaps and
  CELLMEASUREMENT's um-based measurements were off by roughly 2x on real
  data. aviti_discover_tiles.py now reads it per run and threads it
  through stitching/cellmeasurement, falling back to the global param only
  when a run directory predates that field.
- New params: aviti_plate_assembly, aviti_plate_report,
  aviti_well_gap_microns, aviti_plate_tile_size, aviti_plate_max_levels,
  aviti_plate_min_level_size, aviti_plate_compression,
  aviti_plate_classify_by_well.
- Also fixes a pre-existing .gitignore bug: a bare `data/` rule was
  silently matching tests/data/aviti/** everywhere in the tree, so those
  AVITI test fixtures (used by nf-test locally) had never actually been
  committed. Removed the rule and added the fixtures it was hiding,
  including the new ones this feature needs.

Tests: python unit tests for the layout math, streaming pyramid writer
(tile-iterator order/shape, pyramid shapes, downsampling, an end-to-end
write verified against a real tifffile pyramidal OME-TIFF read-back), and
the streaming GeoJSON scanner/merge (coordinate translation, independent
id offsetting). nf-test coverage for both new modules and an extended
aviti_segment subworkflow test asserting the plate emits appear correctly
and that annotations/kronos_input stay well-scoped only.

Note: AVITIASSEMBLEPLATE's nf-test is confirmed passing; a stub-mode bug
in AVITIMERGEPLATEGEOJSON (touching an invalid empty *.gz file, which
crashed nf-test's own snapshot hashing) was found and fixed, but the
verification rerun was interrupted mid-session and not re-confirmed to
completion -- worth a final `nf-test` pass before merging.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Add test
…nfig

Both changes simplify the AVITI configuration surface; neither requires
anything from a user who was relying on the previous behaviour.

- Remove `aviti_cellpaint_batch`. The imaging batch prefix Elembio writes
  projection TIFFs under (e.g. "CP01") is not meaningful to this pipeline and
  is not guaranteed to be the same across channels -- core cell-paint
  channels (Nucleus/Cell-Membrane) can come from one batch while an extended
  cell-paint pass (Golgi/Mitochondria/ER, never read by this pipeline) comes
  from another. `bin/aviti_discover_tiles.py` now locates each channel file
  by matching `*_<tile>_<channel>.tif` in the well directory instead of
  requiring an exact batch prefix up front, and fails loudly if that match is
  ever ambiguous (more than one candidate file). The param, its schema entry,
  its `ext.args` wiring, and its docs table row are all removed.

- Remove `conf/aviti_defaults.config`. Every `aviti_*` value it set was
  already an exact duplicate of nextflow.config's own default, so passing
  `-c conf/aviti_defaults.config` had become a no-op; AVITI's defaults now
  live solely in nextflow.config, with no separate overlay needed to run it.

  Also changed `aviti_cellpose_min_area`'s default to `0` (no filtering),
  and updated its comment, nextflow_schema.json entry, and docs description
  to match.

Tests: extended tests/python/test_aviti_discover_tiles.py with cases for an
arbitrary (non-"CP01") batch name, channels split across two different
batches within one tile, and the new ambiguous-match error; updated every
existing discover_manifest_rows() call site for the removed parameter. Full
python suite (134 tests) and AVITIDISCOVERTILES's nf-test -- including its
real (non-stub) run against the actual CP01-prefixed tests/data/aviti
fixture -- both verified passing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Plate assembly (AVITIASSEMBLEPLATE/AVITIMERGEPLATEGEOJSON) previously ran
for every sample regardless of well count. A single-well "plate" is just
that well's own stitched output again, at the cost of a full pyramidal-image
write/read pass for nothing, so it is now skipped.

- subworkflows/local/aviti_segment/main.nf: groups per-well outputs under a
  plate-scoped meta unconditionally (not just when plate assembly is
  enabled) so both the plate-assembly gate and the report-scope logic can
  use the same, actual per-sample well count. AVITIASSEMBLEPLATE now only
  runs for well_rows.size() > 1; AVITIMERGEPLATEGEOJSON is filtered
  transitively via its join against AVITIASSEMBLEPLATE's layout output.

- Fixed a related bug this exposed: SEGMENTATIONREPORT's per-well-vs-plate
  scope was decided from whether the samplesheet row's `wells` was set --
  the wrong signal, since an unrestricted row can still resolve to one
  well. Left as-is, a single-well sample would have been scored 'plate'
  (no wells restriction) yet had no plate artefacts to report on once the
  >1-well gate was added, and so would silently get no report at all.
  Scope is now decided from the real discovered well count instead.

- modules/local/aviti/discovertiles/main.nf: extended the stub to emit two
  wells (A1, A2) by default, with a `single_well` id-based branch emitting
  just one, so stub-mode tests can exercise both paths without a second
  run-directory fixture. Real (non-stub) discovery is unaffected.

- conf/modules.config: AVITIASSEMBLEPLATE now publishes via
  params.publish_dir_mode rather than a hardcoded 'symlink' for better HPC
  compatibility.

Tests: subworkflows/local/aviti_segment's nf-test gained a case asserting
that a single-well sample (wells left unrestricted, to prove the check
isn't reading that field) skips all plate artefacts but still gets a
per-well report; the two existing cases were updated for the now
two-wells-per-sample stub. All three subworkflow cases and both
AVITIDISCOVERTILES cases (stub and real execution) verified passing via
nf-test --profile apptainer; full python suite (134 tests) unaffected and
passing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…rams

SEGMENTATIONREPORT's ext.args previously always sourced its Quarto
-P cellpose_diameter/min_area/flow_threshold/cellprob_threshold flags
from the COMET/MIBI cellpose_* params, even for AVITI's own call site,
so AVITI segmentation reports showed the wrong tuning values instead of
the aviti_* params that actually produced the masks.

Add a second, fully-qualified withName selector
('.*:AVITI_SEGMENT:SEGMENTATIONREPORT') that Nextflow resolves with
higher priority than the plain 'SEGMENTATIONREPORT' selector for that
call site only, and populate the same -P names from the matching
aviti_* params instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mcmero
mcmero changed the base branch from main to dev September 14, 2026 06:26
@mcmero
mcmero requested a balanced review from Copilot September 14, 2026 06:27
@WEHI-SODA-Hub WEHI-SODA-Hub deleted a comment from github-actions Bot Sep 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Synthetic tile spacing corrupts spatial measurements, while input safety and report/output contract issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds a dedicated AVITI24 cytoprofiling workflow covering tile discovery, Cellpose segmentation, well stitching, plate assembly, measurements, reporting, and KRONOS integration.

Changes:

  • Adds AVITI-specific Nextflow modules, parameters, schemas, and documentation.
  • Adds Python utilities for discovery, segmentation, stitching, and plate generation.
  • Adds comprehensive unit, module, subworkflow, and fixture coverage.
File summaries
File Description
main.nf Wires AVITI input into the pipeline.
workflows/sp_segment.nf Integrates AVITI segmentation and KRONOS outputs.
subworkflows/local/aviti_segment/main.nf Implements the AVITI workflow.
subworkflows/local/aviti_segment/meta.yml Documents the subworkflow contract.
subworkflows/local/aviti_segment/tests/main.nf.test Tests workflow routing and assembly.
subworkflows/local/utils_nfcore_sp_segment_pipeline/main.nf Validates and loads AVITI samplesheets.
modules/local/cellmeasurement/main.nf Supports run-specific pixel sizes.
modules/local/aviti/discovertiles/main.nf Runs tile discovery.
modules/local/aviti/discovertiles/meta.yml Documents discovery inputs and outputs.
modules/local/aviti/discovertiles/environment.yml Defines discovery dependencies.
modules/local/aviti/discovertiles/tests/main.nf.test Tests discovery execution.
modules/local/aviti/discovertiles/tests/main.nf.test.snap Records discovery snapshots.
modules/local/aviti/mergetilechannels/main.nf Builds multichannel tile images.
modules/local/aviti/mergetilechannels/meta.yml Documents channel merging.
modules/local/aviti/mergetilechannels/environment.yml Defines merge dependencies.
modules/local/aviti/mergetilechannels/tests/main.nf.test Tests channel merging.
modules/local/aviti/mergetilechannels/tests/main.nf.test.snap Records merge snapshots.
modules/local/aviti/wholecellsegment/main.nf Runs Cellpose v4 whole-cell segmentation.
modules/local/aviti/wholecellsegment/meta.yml Documents whole-cell segmentation.
modules/local/aviti/wholecellsegment/environment.yml Defines Cellpose v4 dependencies.
modules/local/aviti/wholecellsegment/tests/main.nf.test Tests whole-cell module wiring.
modules/local/aviti/wholecellsegment/tests/main.nf.test.snap Records whole-cell snapshots.
modules/local/aviti/membranesegment/main.nf Runs custom membrane models.
modules/local/aviti/membranesegment/meta.yml Documents membrane segmentation.
modules/local/aviti/membranesegment/environment.yml Defines Cellpose 3 dependencies.
modules/local/aviti/membranesegment/tests/main.nf.test Tests membrane module wiring.
modules/local/aviti/membranesegment/tests/main.nf.test.snap Records membrane snapshots.
modules/local/aviti/nuclearsegment/main.nf Runs nuclear segmentation.
modules/local/aviti/nuclearsegment/meta.yml Documents nuclear outputs.
modules/local/aviti/nuclearsegment/environment.yml Defines nuclear dependencies.
modules/local/aviti/nuclearsegment/requirements-pip.txt Pins CUDA-enabled PyTorch.
modules/local/aviti/nuclearsegment/tests/main.nf.test Tests nuclear module wiring.
modules/local/aviti/nuclearsegment/tests/main.nf.test.snap Records nuclear snapshots.
modules/local/aviti/stitchwell/main.nf Stitches tile-level well outputs.
modules/local/aviti/stitchwell/meta.yml Documents well stitching.
modules/local/aviti/stitchwell/environment.yml Defines stitching dependencies.
modules/local/aviti/stitchwell/tests/main.nf.test Tests well stitching.
modules/local/aviti/stitchwell/tests/main.nf.test.snap Records stitching snapshots.
modules/local/aviti/assembleplate/main.nf Builds plate-level OME-TIFFs.
modules/local/aviti/assembleplate/meta.yml Documents plate assembly.
modules/local/aviti/assembleplate/environment.yml Defines assembly dependencies.
modules/local/aviti/assembleplate/tests/main.nf.test Tests plate assembly.
modules/local/aviti/assembleplate/tests/main.nf.test.snap Records assembly snapshots.
modules/local/aviti/mergeplategeojson/main.nf Merges well GeoJSON annotations.
modules/local/aviti/mergeplategeojson/meta.yml Documents GeoJSON merging.
modules/local/aviti/mergeplategeojson/environment.yml Defines merge dependencies.
modules/local/aviti/mergeplategeojson/tests/main.nf.test Tests GeoJSON module wiring.
modules/local/aviti/mergeplategeojson/tests/main.nf.test.snap Records GeoJSON snapshots.
bin/aviti_discover_tiles.py Discovers wells, tiles, and pixel size.
bin/aviti_merge_tile_channels.py Creates named OME-TIFF channel stacks.
bin/aviti_wholecell_segment.py Implements Cellpose v4 segmentation.
bin/aviti_cellpose3_segment.py Implements custom nuclear/membrane segmentation.
bin/aviti_stitch.py Implements mask and image stitching.
bin/aviti_plate_common.py Provides shared plate geometry.
bin/aviti_assemble_plate_image.py Streams pyramidal plate images.
bin/aviti_merge_plate_geojson.py Streams translated plate annotations.
bin/combine_channels.py Updates copyright metadata.
bin/extract_markers.py Updates copyright metadata.
bin/parquet_to_tiff.py Updates copyright metadata.
tests/python/test_aviti_discover_tiles.py Tests discovery behavior.
tests/python/test_aviti_wholecell_segment.py Tests mask filtering.
tests/python/test_aviti_cellpose3_segment.py Tests custom-model preprocessing.
tests/python/test_aviti_stitch.py Tests stitching and relabeling.
tests/python/test_aviti_plate_common.py Tests plate geometry.
tests/python/test_aviti_assemble_plate_image.py Tests pyramid generation.
tests/python/test_aviti_merge_plate_geojson.py Tests annotation merging.
tests/data/aviti/RunParameters.json Supplies synthetic run metadata.
tests/data/aviti/models/test_model Supplies a staged model fixture.
tests/data/aviti/plate/test_plate_layout.csv Supplies plate placement data.
tests/data/aviti/plate/test__WellA1.geojson Supplies A1 annotations.
tests/data/aviti/plate/test__WellB1.geojson Supplies B1 annotations.
tests/data/aviti/plate/test__WellA1_image_stitched.tif Supplies an A1 image fixture.
tests/data/aviti/plate/test__WellB1_image_stitched.tif Supplies a B1 image fixture.
tests/data/aviti/stitch/* Supplies tile-level stitching fixtures.
tests/data/aviti/Projection/WellA1/* Supplies synthetic AVITI channel tiles.
assets/schema_input_aviti.json Defines the AVITI samplesheet schema.
nextflow.config Adds AVITI defaults.
nextflow_schema.json Exposes AVITI parameters.
conf/modules.config Configures resources, arguments, and publishing.
pyproject.toml Defines Python test dependencies.
uv.lock Locks Python dependencies.
.github/workflows/python-tests.yml Adds dedicated Python CI.
.github/workflows/linting.yml Removes duplicate pytest execution.
.nf-core.yml Adjusts lint exclusions.
.gitignore Tracks fixtures and ignores virtual environments.
README.md Introduces AVITI support.
docs/usage.md Documents AVITI configuration and operation.
docs/output.md Documents AVITI output layouts.
CHANGELOG.md Records the new feature.
Review details
  • Files reviewed: 72/100 changed files
  • Comments generated: 4
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread assets/schema_input_aviti.json Outdated
Comment thread conf/modules.config Outdated
Comment thread modules/local/aviti/discovertiles/main.nf Outdated
Comment thread subworkflows/local/aviti_segment/main.nf Outdated
mcmero and others added 2 commits September 14, 2026 20:30
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit e88209a

+| ✅ 102 tests passed       |+
#| ❔  31 tests were ignored |#
!| ❗   5 tests had warnings |!
Details

❗ Test warnings:

  • pipeline_todos - TODO string in README.md: Add bibliography of tools and data used in your pipeline
  • pipeline_todos - TODO string in main.nf: Optionally add in-text citation tools to this list.
  • pipeline_todos - TODO string in main.nf: Optionally add bibliographic entries to this list.
  • pipeline_todos - TODO string in main.nf: Only uncomment below if logic in toolCitationText/toolBibliographyText has been filled!
  • pipeline_name_conventions - Naming does not adhere to nf-core conventions: Contains non alphanumeric characters

❔ Tests ignored:

  • files_exist - File is ignored: conf/igenomes.config
  • files_exist - File is ignored: conf/igenomes_ignored.config
  • files_exist - File is ignored: assets/multiqc_config.yml
  • files_exist - File is ignored: conf/igenomes.config
  • files_exist - File is ignored: conf/igenomes_ignored.config
  • files_exist - File is ignored: conf/test.config
  • files_exist - File is ignored: conf/test_full.config
  • files_exist - File is ignored: assets/multiqc_config.yml
  • files_exist - File is ignored: .github/ISSUE_TEMPLATE/config.yml
  • files_exist - File is ignored: .github/workflows/nf-test.yml
  • files_exist - File is ignored: .github/workflows/awstest.yml
  • files_exist - File is ignored: .github/workflows/awsfulltest.yml
  • files_exist - File is ignored: .github/workflows/download_pipeline.yml
  • files_exist - File is ignored: .github/workflows/fix-linting.yml
  • files_exist - File is ignored: .github/workflows/release-announcements.yml
  • files_exist - File is ignored: .github/workflows/template_version_comment.yml
  • files_exist - File is ignored: .github/workflows/pr-comment.yml
  • files_exist - File is ignored: .github/actions/get-shards/action.yml
  • files_exist - File is ignored: .github/actions/nf-test/action.yml
  • files_exist - File is ignored: .github/actions/
  • files_exist - File is ignored: assets/nf-core-sp_segment_logo_light.png
  • files_exist - File is ignored: docs/images/nf-core-sp_segment_logo_light.png
  • files_exist - File is ignored: docs/images/nf-core-sp_segment_logo_dark.png
  • files_exist - File is ignored: docs/CONTRIBUTING.md
  • files_exist - File is ignored: tests/default.nf.test
  • nextflow_config - nextflow_config
  • files_unchanged - Required pipeline config not found - {'manifest.contributors'}
  • actions_nf_test - '.github/workflows/nf-test.yml' not found
  • actions_awstest - 'awstest.yml' workflow not found: /home/runner/work/sp_segment/sp_segment/.github/workflows/awstest.yml
  • schema_params - schema_params
  • multiqc_config - multiqc_config

✅ Tests passed:

Run details

  • nf-core/tools version 3.3.2
  • Run at 2026-10-09 05:41:16

mcmero and others added 3 commits September 15, 2026 00:52
meta.id for plate-scoped meta is "<sample>__plate", kept distinct from
the well-scoped join key. AVITIASSEMBLEPLATE and AVITIMERGEPLATEGEOJSON
built filenames straight off meta.id, doubling up as
sample__plate_plate.ome.tif / .geojson instead of the documented
sample_plate.*. Build filenames from meta.sample instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…efault

SEGMENTATIONREPORT's AVITI ext.args hardcoded
-P cellpose_diameter:${params.aviti_wholecell_diameter}, so every report
showed the v4 SAM default even when a sample used a per-row cell_diameter
override or the v3 Cellpose membrane path's aviti_membrane_diameter.
Carry the effective diameter and, for the v3 path, the membrane model name
through well/plate meta (aviti_diameter/aviti_model, sample-level and so
constant across a sample's wells/plate) and read those in the report's
ext.args instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Nextflow's strict-syntax parser (24.10+/26.x) scopes a def x = { ... }
closure declared inside workflow { } to that block; it isn't visible to
closures used in later .map/.filter calls the way the old lenient parser
allowed. CI (Nextflow 26.08.0-edge) failed to compile aviti_segment/main.nf
with "plate_meta_of is not defined" / "to_report_input is not defined" as
a result. Move both to plain top-level functions above the workflow block,
which stay visible throughout the file.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mcmero
mcmero requested a review from pr4deepr September 15, 2026 05:35
@mcmero
mcmero requested a review from mikemcka September 15, 2026 05:36
mcmero and others added 2 commits October 9, 2026 13:46
… AVITI's

Since aviti_defaults.config was removed, a run whose RunParameters.json has
no ImageInfo.PixelSizeUm silently falls back to the global 0.28 (COMET).
Document that AVITI is typically 0.48 and that the param should be set
explicitly for such runs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants