Skip to content

Milab-6720: fix tsv separator, fix anarci version - #48

Merged
erohinaelena merged 4 commits into
mainfrom
MILAB-6720_import-vdj-separator
Aug 24, 2026
Merged

Milab-6720: fix tsv separator, fix anarci version#48
erohinaelena merged 4 commits into
mainfrom
MILAB-6720_import-vdj-separator

Conversation

@erohinaelena

@erohinaelena erohinaelena commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR fixes server-side TSV profiling, restores ANARCI execution in containerized deployments, and migrates three companion software packages to environment-aware builds.

  • Separator — the delimiter used to parse tabular fields; workflow arguments now carry stable names such as tab and comma, which the profiler resolves to characters locally.
  • Column profile — whole-file evidence describing headers, value types, and likely amino-acid columns; its invocation now avoids tab-character corruption across shell-based runners.
  • Software descriptor — metadata describing executable artifacts, commands, images, and entrypoints; software builds now use block-tools software build so local and remote variants include the expected container artifacts.
  • ANARCI — the numbering executable used to derive receptor framework and CDR regions; its package moves from 0.0.3 to 1.0.1 so the descriptor records the micromamba container entrypoint.
  • Build location — the local or remote destination selected through PL_BUILD_LOCATION; it replaces the legacy PL_PKG_DEV role in root scripts and Turbo cache inputs.
  • Package scripts for column profiling, spreadsheet conversion, and region annotation now use Block Tools and portable shx file operations.

Confidence Score: 5/5

The PR appears safe to merge; the changed separator, software-build, and ANARCI dependency paths remain aligned with their current callers and runtime contracts.

The profiler receives a delimiter matching every supported prepared-file representation, the software packages use the repository’s environment-aware build flow, and no concrete incompatibility was found in the ANARCI upgrade.

Important Files Changed

Filename Overview
software/column-profile/src/main.py Adds validated named-separator resolution while preserving support for direct single-character delimiters.
workflow/src/prerun.tpl.tengo Passes comma or tab according to the prepared file extension, keeping CSV, TSV, and converted XLSX profiling aligned.
workflow/src/profile-columns.tpl.tengo Documents and forwards the named-separator contract to the profiling executable.
software/column-profile/package.json Migrates software building and packing from package-builder to Block Tools with portable file operations.
software/region-annotation/package.json Migrates the two-entrypoint region-annotation package to the environment-aware Block Tools build path.
software/xlsx-to-csv/package.json Migrates spreadsheet-converter software builds and packaging to Block Tools.
pnpm-workspace.yaml Upgrades the shared ANARCI software package to 1.0.1, whose descriptor records the required container entrypoint.
package.json Removes obsolete PL_PKG_DEV settings from root test and local-build commands in favor of the existing PL_BUILD_* contract.
turbo.json Removes the obsolete build-cache input while retaining the environment variables used by Block Tools.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Input[CSV, TSV, or XLSX] --> Prepare[Prepare readable table]
  Prepare --> Select[Choose named separator]
  Select --> Profile[Resolve name and profile columns]
  Profile --> Mapping[Mapping setup]
  Mapping --> Import[Import records]
  Import --> ANARCI[ANARCI 1.0.1 with recorded entrypoint]
  ANARCI --> Regions[FR and CDR annotation]
  BuildEnv[PL_BUILD variant and location] --> BlockTools[Block Tools software build]
  BlockTools --> Profile
  BlockTools --> ANARCI
Loading

Reviews (1): Last reviewed commit: "MILAB-6720: move to software-anarci 1.0...." | Re-trigger Greptile

Context used (5)

Loading a TSV failed on server deployments with `TypeError: "delimiter" must be
a 1-character string` while the same file loaded on a desktop backend. The block
passed a real tab as an argv element. Desktop runners exec argv directly, so the
tab arrived intact; the k8s and google-batch runners serialise the command with
Go's %q and re-run it through `sh -c`, where the tab has already become the two
characters \ and t and stays that way.

Prerun now sends "tab" or "comma" and main.py maps the name back to the
character, so only plain words cross the runner boundary. A separator that still
arrives malformed fails with a message naming the accepted values rather than a
TypeError.
pl-pkg build ignores PL_BUILD_CHANNEL/VARIANT/LOCATION and defaults docker
image builds to CI-only, so a local build:dev-remote produced binary-only
descriptors. A block built that way cannot run on a k8s deployment, which
launches containers exclusively.

block-tools software build honours those variables — variant all builds the
images, location remote pushes them — matching tcr-disco and the other
already-migrated software packages. PL_PKG_DEV drops out of the root scripts
and turbo.json, since PL_BUILD_LOCATION now carries its meaning.
Region annotation failed on k8s with "ANARCI: not found" (127). The conda image
exposes its env only via ENTRYPOINT ["micromamba", "run", "--prefix",
"/conda-env"], a k8s pod spec overrides the image entrypoint, and every
software-anarci up to 1.0.0 records docker.entrypoint: [] — so nothing
re-applied the wrapper. 1.0.1 was built by a package-builder that reads
.Config.Entrypoint back from the image, so the runner can reconstruct it.

^0.0.3 is exact for a 0.0.x range, so the pin never picked the fix up.
Part of the canonical software-module shape that block-tools structure applies
(N("type","module")), and what every already-migrated software package carries.
Missed in the block-tools build migration.
@erohinaelena
erohinaelena enabled auto-merge August 24, 2026 17:15
@erohinaelena
erohinaelena added this pull request to the merge queue Aug 24, 2026
Merged via the queue into main with commit ab98976 Aug 24, 2026
10 checks passed
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.

1 participant