Skip to content

Folders named single are refused, but existing lab datasets use them #24

Closed

Description

@guijacquemet

@IvanHCenalmor, raised at Guillaume's request. This is a question for you; nothing was changed here.

What happened

To fit MorphoFeature's model-input scaling from your saved histograms (plane_histograms.csv + run_manifest.json, MorphoFeature decision D70), I ran run_experiment on MorphoRelate's data/hpmec_perfusion/images. That dataset is laid out as HPMEC_ctrl/single/Position_1.tif, i.e. condition / biological repeat named single / image. Preprocessing refused it:

reserved_folder_name: "single" is reserved for missing hierarchy levels and cannot be used as a folder name.
paths: ('HPMEC_cond2/single', 'HPMEC_ctrl/single')

This matches docs/contract.md §1 ("A folder named single (in any upper/lower case) is an error"). Copying the images without the single level (HPMEC_ctrl/Position_1.tif) gives exactly the labels the dataset intends: condition HPMEC_ctrl, repeat single, technical repeat single. MorphoFeature's fit from your table then equals the fit on the images, bit for bit.

The question

A folder named single yields the same label a missing level gets. Lab data written for MorphoRelate, and possibly other existing folders, use that layout, so users would have to restructure their data before preprocessing. Would you consider one of these?

  1. Accept a folder named single as an explicit single label. Keep refusing the cases that really are ambiguous, for example a single folder next to sibling repeats, or case variants like Single.
  2. Keep the refusal, but improve the message: say that the folder's images can move up one level and will get the same labels.
  3. Keep it as is. I'll then document in MorphoFeature's run tool that lab folders must not use single.

You know why the rule exists better than I do. If there's a case where accepting it would mislabel images, option 1 is off the table.

Activity

  1. guijacquemet commented on Oct 27, 2026

    @guijacquemet
    ContributorAuthor

    Correction, my mistake: this is already handled on main. Commit 5924b74, merged with #20 at 08:25 UTC today, accepts a lower-case single folder when it is the only folder in its place, exactly the HPMEC_ctrl/single/Position_1.tif case (contract §1 "Folders named single", tests/test_discovery.py). It stays an error for other spellings or with sibling folders.

    I tested an older commit, b1e252d, the #19 merge, before #20 landed, so the issue quoted the old rule. Closing as already done. Sorry for the noise, @IvanHCenalmor.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions