Skip to content

MILAB-7208, MILAB-7329: one group label column across grouped datasets; fix the multisample import dialog - #140

Merged
julenmendieta merged 8 commits into
mainfrom
julenmendieta/MILAB-7208_fixLabels
Nov 16, 2026
Merged

julenmendieta merged 8 commits into
mainfrom
julenmendieta/MILAB-7208_fixLabels

Conversation

@julenmendieta

@julenmendieta julenmendieta commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Fixes two Samples & Data bugs on one branch: group labels across grouped datasets (MILAB-7208) and the multisample H5AD/Seurat import dialog (MILAB-7329). Includes SDK 1.88 and a Seurat parser fix for Docker/Kubernetes.

MILAB-7208 — group labels for every grouped dataset

Problem. Every grouped dataset (Multiplexed FASTQ, Bulk Count Matrix, Multi-sample H5AD/Seurat) uses the same pl7.app/sampleGroupId axis. The block exported one pl7.app/label column per dataset (dataset.<id>.sampleGroupLabels, with a pl7.app/dataset domain). Label lookups match by axis and take the first matching column, so with two or more grouped datasets, downstream blocks showed "Unlabelled" (findLabelsForColumnAxis) or raw group IDs (findLabels) for all datasets but one.

Change (workflow/src/main.tpl.tengo). One export, sampleGroupLabels, holds the groups of all grouped datasets. It sits on the plain group axis with domain {pl7.app/block} only, the same shape as the sample label column, and is emitted only when a grouped dataset exists.

Rejected: making the SDK's findLabels merge all matching columns (changes every block); adding pl7.app/dataset to the group axis domain (breaks joins and existing projects).

MILAB-7329 — multisample import dialog

  • "Parsing files…" clears as soon as every file the pattern matches has its column list. Before, it hung for files parsed in an earlier import and for files with an empty column list.
  • A file that cannot be read gets an error naming it; a file whose obs / Seurat metadata has no columns gets a warning. Create stays disabled in both cases.
  • Files excluded by the pattern are not checked, so they no longer block Create.
  • Seurat files added with "+ Add More Files" are parsed, and the sample column is pre-filled and saved.
  • The lists of files to parse are cleared when the dialog closes. Deleting a dataset or replacing a Seurat file no longer edits them.
  • Editing the pattern keeps the selected type (e.g. Multisample H5AD) unless the pattern implies a different one, such as a new file extension or a lane placeholder.
  • ReactiveFileContent never loads a 0-byte file, so the dialog treats a 0-byte column list as empty (workaround; the SDK bug is not fixed here).

Maintenance

  • Seurat parser image runs Rscript /app/main.R. Multisample Seurat import failed with "permission denied" on Docker and Kubernetes backends because main.R is not executable.
  • Parse jobs are named parse-h5ad and parse-seurat (shown in errors and Kubernetes job names).
  • SDK 1.88 (model 1.88.0, ui-vue 1.88.3, workflow-tengo 6.22.0), Node 24.22.1, pnpm 12.16.1.
  • .changeset/config.json: block, model, ui and workflow form a fixed group, so they release with one version.

Impact on existing projects

  • The export dataset.<id>.sampleGroupLabels is replaced by sampleGroupLabels. No block in our workspace reads the old name; blocks look labels up by axis. If you know of a consumer that reads it by name, please flag it.
  • After the update, existing projects lose the per-dataset label columns and get the merged one. Downstream blocks find it by axis; checked by updating a published S&D in place (see Validation).
  • Create is disabled for unreadable files and files without metadata columns (before: the dialog hung).

Validation

Check Result
Published vs this branch, 3 Multiplexed FASTQ datasets published: 3 label columns, a clonotyping block showed another dataset's labels; branch: 1 label column, every group resolves
Same block plus 2 Multi-sample H5AD datasets with different sample columns 9 groups (5 FASTQ + 4 H5AD) in one label column
Downstream blocks on 7 grouped datasets (Multiplexed FASTQ, Multi-sample H5AD, Multi-sample Seurat) FastQC, FASTQ Demultiplexing, MiXCR Amplicon, MiXCR scFv and a clonotyping block that uses findLabels all show File IDs; the result pool has one sampleGroupLabels column
Upgrade: published S&D with 3 Multiplexed FASTQ datasets and downstream blocks, updated in place to this branch before: FastQC and FASTQ Demultiplexing showed "Unlabelled" for all 3 groups; after: S&D and downstream blocks re-run without errors and show mux1/mux2/mux3
Import dialog: re-import after cancel, empty obs, unreadable file, excluded file, Seurat add-more, pattern edit behave as in MILAB-7329
Multisample Seurat on Docker/Kubernetes parses
Block tests (local; CI skips them) 6/8 pass; the 2 multisample H5AD/Seurat tests fail the same way on main

Known limitations

  • Two grouped datasets that use the same File ID show the same label for different groups. Group IDs differ, so data does not collide (checked with 3 datasets sharing mux1).
  • The first parse of multisample files is slow (job start-up; not addressed here).

How to test

  1. In one Samples & Data block, add two grouped datasets, e.g. two Multi-sample H5AD datasets from different files, or two Multiplexed FASTQ datasets. Run it.
  2. Add FastQC on either dataset: groups show their File IDs, no "Unlabelled".
  3. Import dialog: select a multisample file with no obs columns → warning and Create disabled. Edit the pattern → the type stays.

@julenmendieta

Copy link
Copy Markdown
Contributor Author

@greptileai review

Comment thread ui/src/dialogs/ImportDatasetDialog.vue Outdated
Comment on lines +1015 to +1017
// A multisample dataset needs a non-empty column list for every file
(!isMultiSampleType.value ||
parsedFiles.value.every((f) => (columnsByFile.value[f.handle]?.length ?? 0) > 0)) &&

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Excluded files block import

canCreateOrAdd now checks every selected file, including files excluded by the filename pattern. If a user selects two valid H5AD files and excludes one whose obs has no columns, Create stays disabled even after the matching file has loaded. Both multisample import functions skip unmatched files, so the excluded file should not block import.

Filter by f.match before checking column readiness, and use the same matched-file set for preprocessing and loading messages.

Knowledge Base Used: Import dialogs and composables

Prompt To Fix With AI
This is a comment left during a code review.
Path: ui/src/dialogs/ImportDatasetDialog.vue
Line: 1015-1017

Comment:
**Excluded files block import**

`canCreateOrAdd` now checks every selected file, including files excluded by the filename pattern. If a user selects two valid H5AD files and excludes one whose `obs` has no columns, Create stays disabled even after the matching file has loaded. Both multisample import functions skip unmatched files, so the excluded file should not block import.

Filter by `f.match` before checking column readiness, and use the same matched-file set for preprocessing and loading messages.

**Knowledge Base Used:** [Import dialogs and composables](https://app.greptile.com/-/switch-tenant?tenant=milaboratories&next=%2Fcustom-context%2Fknowledge-base%2Fplatforma-open%2Fsamples-and-data%2F-%2Fdocs%2Fimport-dialogs-and-composables.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in a2101e2: Create now checks only the files the pattern matches, so an excluded file no longer blocks it.

… selected type while the pattern is edited

- Pre-fill and save the sample column when adding files to a Multisample Seurat dataset
- Run the Seurat parser with Rscript so it works on Docker and Kubernetes backends
- Name the parsing jobs parse-h5ad and parse-seurat
- Update the SDK to 1.88
@greptile-apps

greptile-apps Bot commented Nov 6, 2026

Copy link
Copy Markdown

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@julenmendieta julenmendieta changed the title Julenmendieta/MILAB 7208 fixLabels MILAB-7208, MILAB-7329: one group label column across grouped datasets; fix the multisample import dialog Nov 9, 2026
@julenmendieta
julenmendieta added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit e051fb4 Nov 16, 2026
11 checks passed
@julenmendieta
julenmendieta deleted the julenmendieta/MILAB-7208_fixLabels branch November 16, 2026 12:50
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.

2 participants