Preserve URI scheme when resolving Xenium bundle child paths#190
Merged
heylf merged 1 commit intoJul 22, 2026
Merged
Conversation
Bundle validation built child paths from `Path.toString()`, which drops the URI scheme (e.g. `s3://`) for remote filesystems. On object-storage work dirs (S3 on AWS Batch) the scheme-less path was resolved on the local filesystem, so every child-file check failed with `Xenium bundle does not exist` / `NoSuchFileException`, even though the UNTAR step succeeded. Use scheme-preserving `Path.resolve()` / `toUriString()` instead of `toString()` at all bundle-path construction sites. This fixes both the `-profile test` staging path (UNTAR output) and production runs where the samplesheet supplies an object-storage bundle. No change on local / shared-filesystem executors. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
heylf
approved these changes
Jul 22, 2026
heylf
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. Thank you so much @rnaidu-seqera for your fix and work ❤️
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.
Problem
Running the pipeline on an object-storage work directory (S3 on AWS Batch) aborts during Xenium bundle validation, even though the
UNTARstep succeeds:Note the paths have no
s3://scheme — the bucket name became the first segment of a local path.Root cause
Bundle child paths were built from
Path.toString(). For remote filesystems,nextflow.cloud.aws.nio.S3Path.toString()returns/<bucket>/<key>and drops thes3://scheme. The scheme-less string was then re-parsed withfile(...), which resolved it on the local filesystem of the head node, where the files don't exist.This is invisible on local / shared-filesystem executors (e.g. nf-core CI), because there
toString()already yields a valid local path. It only manifests on object storage.Affected sites in
workflows/spatialaxe.nf:UNTARoutput staging (-profile test)transcripts.parquet,experiment.xenium,gene_panel.json, and the morphology-focus image resolutionFix
Use scheme-preserving APIs instead of
toString():Path.resolve(child)for the required/optional file existence checks (keeps the filesystem provider);bundle.toUriString()/file(bundle).toUriString()for the UNTAR staging value and the string-concatenation sites.No behaviour change on local / shared-filesystem executors.
Validation
S3Pathfors3://inputs (including the trailing-slashmorphology_focus/directory) andUnixPathfor local inputs.nextflow lintpasses with no new errors.PR checklist
CHANGELOG.mdis updated.nf-test/ CI green (please run in nf-core CI).