Conversation
Tools that locate a companion file by name need it present in the filesystem but absent from the arguments. htslib resolves an index by appending .csi or .bai to the data file path, so bcftools merge, isec and consensus need a file at exactly <datafile>.csi that is never passed to the tool. A file input is always emitted, flagged or positional, so declaring the index as an extra input sends it along as a stray argument and the command fails. Treat mode: sidecar exactly like a file input for mounting, including the re-mount under a declared name when the file comes from an upstream node, and leave the argument-building block untouched so a sidecar falls through it. The name comes from the same resolver as every other input, so a data input declaring filename a.vcf.gz and a sidecar declaring a.vcf.gz.csi land beside each other with the per-invocation prefix on both, and the sibling relationship htslib needs is preserved. Depends on the schema change in the hub, which adds the mode and requires a sidecar to declare a filename. No recipe declares mode: sidecar on any branch today, so this path is unreachable until one opts in.
This was referenced Aug 3, 2026
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.
Summary
Some tools locate a companion file by name rather than taking it as an argument. htslib resolves an index by string-appending
.csior.baito the data file path, sobcftools merge,isecandconsensusneed a file at exactly<datafile>.csithat is never passed to the tool.Today that is inexpressible. A
mode: fileinput is always emitted — flagged, or positional if it has no flag — so declaring the index as an extra input hands it to the tool as a stray positional and the command fails. This is the gap noted in #91, which said the filename change alone would not unblock those operations.This treats
mode: sidecarexactly like a file input for mounting, and leaves the argument-building block untouched so a sidecar falls through it.Why the naming works out
The sidecar goes through the same resolver as every other input, so within one invocation:
filename: a.vcf.gzinput-<nodeId>-a.vcf.gzfilename: a.vcf.gz.csiinput-<nodeId>-a.vcf.gz.csiThe data file is passed to the tool as
input-<nodeId>-a.vcf.gz; htslib appends.csiand finds the sidecar. The per-invocation prefix is on both, so the sibling relationship survives and names stay unique between nodes.The upstream-node path is covered too: a sidecar piped from, say, a
samtools indexnode is re-mounted under its declared name by the same code #91 added.Scope
+8 −2, all within the input-preparation loop. The argument-building block is deliberately not touched — that is what makes a sidecar invisible to argv.Verification
mode: sidecaron any ref ofbiochef-recipes(it could not, until the hub change lands), so the new path is unreachable and nothing existing changes behaviour.npm run build:webpack 5.106.2 compiled successfully.No automated tests: the repo has no test script and no workflow runs on a PR here. As with #91, the substantive evidence is that the changed path cannot execute for any recipe that exists today.
Merge order
Stacked on #91 — base it on
honour-input-filename, notmain, and merge #91 first.src/utils/toolUtils.jsis where five open branches meet: #91, #92, #93, this one, and WildBunnie'saioli-vendored(#90). They all conflict there pairwise, so the order matters more than usual.