Repository navigation
MILAB-7420: Multisample CSV/TSV dataset type - #143
Merged
Merged
Conversation
New dataset type MultiSampleXsv: long CSV/TSV files (one per group, .gz supported) where one column names the samples. - Prerun reads each file's header for the sample-column picker and the distinct values of the chosen column via ptabler (as text; empty and whitespace-only values skipped; at most 3000 per file) - "Import samples" creates one sample per distinct value - Export pl7.app/sequencing/data/sampleGroups on [sampleGroupId, sampleId] (value = the sample's value in the file), for this type only; group axis annotated with pl7.app/sampleColumnName - BlockData V20261116 adds xsvFilesToPreprocess (dialog scaffolding) - Import dialog: column picker offers columns every file has; refuses mixed csv/tsv, and a separator or compression unlike the dataset's - Dataset page for the new type - Tengo unit tests (header/value parsing, mapping column) and a block test with synthetic tables Also affects existing types: - "Import samples" counts distinct sample names and shows extraction errors instead of spinning - multiplexingRules column data written with canonical.encode
- Tengo: exact bytes of the {keyLength, data} payload; no column before samples are imported
- Block: whitespace-only sample values skipped; more than 3000 values and a missing sample column fail the sampleGroups output
Contributor
Author
|
@greptileai review |
mzueva
approved these changes
Nov 17, 2026
…as the same in XSV mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Adds a "Multisample CSV/TSV" dataset type for long tables that hold all samples in one file, with one column naming the sample (MILAB-7420: peptide count tables, later other preprocessed long tables). Each distinct value of that column becomes a Samples & Data sample that can carry metadata, and the dataset exports a group-to-sample mapping so an import block can put each sample's rows on the S&D sample axis.
What changes
MultiSampleXsv(kind minor): one CSV/TSV file per group (.gzsupported) and a requiredsampleColumnName.01and1are two samples), empty and whitespace-only values skipped, sorted, at most 3000 per file (more fails with a message naming the column and file).pl7.app/sequencing/data/sampleGroupson[sampleGroupId, sampleId], value = the sample's value in the file, for this type only. Data is thePColumnData/Jsonpayload{keyLength: 2, data}, canonically encoded. Not marked as a linker (pl7.app/isLinkerColumn), since a sample can sit in several files. The group axis carriespl7.app/sampleColumnName, which tells these datasets apart from Bulk Count Matrix.V20261116addsxsvFilesToPreprocess(import-dialog scaffolding, not part of the kind contract) with a migration; new outputavailableXsvColumns.PL_DOCKER_RELAYER=chunkahin the CI env input and turbo's build env.For the design review
221ec91, for the new type only. That commit's spec scoped the removal to Multiplexed FASTQ, and the existing consumer (import-sc-rnaseq-data) still reads this column, so other grouped types can join later without a new name.Impact on existing users
canonical.encodeinstead ofjson.encodeon a map: same content, fixed key order. Its bytes change once after the update, so FASTQ Demultiplexing downstream may recompute once.xsvFilesToPreprocess).Validation
pnpm check, Tengo unit tests 24/24, model 13/13, UI 88/88, block tests 11/11 (including two new prerun-refusal cases: more than 3000 values, and a sample column missing from a file).Known limitations
name_duplicated_0).block-tools structure refresh(andpnpm upgrade-sdk) removes the twoPL_DOCKER_RELAYERedits, since block-tools 2.20.1's templates don't include it; the software images get the new layering at their next release.Follow-ups
221ec91); confirmed by a run. Fix in a separate PR: emit this column for those types too.Fix the two sample-label issues before merging so valid input names cannot lose or corrupt samples.
Fix with agent prompt
Summary
Adds Multisample CSV/TSV datasets, with sample-column selection, sample extraction, and exports that connect each file to its samples. The latest update gives repeated values separate samples per file while keeping existing sample IDs.
Important touched types:
Previous threads: the old-mapping replacement issue is fixed.
julenmendietaaccepted the quoted-newline heading limitation because that input is very unlikely. The empty-replacement thread was manually resolved without explanation.Reviews (3) · Last reviewed commit: "Review changes. Don't handle same label ..." · Reviewed by Greptile