API Reference
The nf-bids API reference is generated directly from the GroovyDoc docstrings in
src/main/groovy, so it always reflects the actual public surface of the plugin.
The full generated reference is available here:
Public API Overview
The tables below summarise every public class by package. Follow the links or browse the generated GroovyDoc for full method signatures and parameter descriptions.
nfneuro.plugin — Plugin core
| Class | One-line purpose |
|---|---|
|
PF4J plugin entry point; discovered and loaded by the Nextflow plugin manager. |
|
DSL extension point; provides |
|
|
|
|
nfneuro.plugin.channel — Channel construction
| Class | One-line purpose |
|---|---|
|
Orchestrates the complete |
|
Fluent builder that sequences config loading, parsing, set-handler routing, cross-modal broadcasting, and channel emission. |
nfneuro.plugin.channel.operations — Channel operators
| Class | One-line purpose |
|---|---|
|
Groups channel items by a closure-extracted key; emits |
|
Inner-joins two channels by closure-extracted keys; emits fused items (no key in payload). |
|
Produces the cartesian product of left × right items within each matching key group. |
nfneuro.plugin.channel.operations.keys — Key infrastructure
| Class | One-line purpose |
|---|---|
|
Validates key-extractor closures and invokes them with consistent error handling; wraps list keys in |
|
Immutable wrapper for multi-part (list) grouping keys that provides correct |
nfneuro.plugin.parser — BIDS parsing
| Class | One-line purpose |
|---|---|
|
Drives dataset parsing: calls |
|
Locates and executes the |
|
Stub bids-validator integration (deferred to v1.1); provides pre-flight directory / config checks. |
nfneuro.plugin.config — Configuration
| Class | One-line purpose |
|---|---|
|
Reads and parses |
|
Validates the parsed YAML structure (set types, required groups, |
|
Scans the config map and returns boolean flags that drive set-handler selection in |
nfneuro.plugin.grouping — Set handlers
| Class | One-line purpose |
|---|---|
|
Abstract base that groups files by loop-over entities, matches them against config entries, and delegates emission to sub-classes. |
|
Handles |
|
Handles |
|
Handles |
|
Handles |
nfneuro.plugin.model — Domain model
| Class | One-line purpose |
|---|---|
|
Root container: path, name, description, file list, and participant table. |
|
Single BIDS file entry: path, suffix, entity list, sidecar references, and file-system metadata. |
|
A single BIDS key–value entity ( |
|
In-flight accumulator used by set handlers; serialises to the |
nfneuro.plugin.util — Utilities
| Class | One-line purpose |
|---|---|
|
Structured SLF4J logging with context-prefixed messages and an optional |
|
Resolves |
|
Entity filtering and |
|
Context-aware error wrapping ( |
|
Parses the TSV produced by |
Key entry points
The table below shows the exact signatures of the four user-facing DSL
entry points, cross-verified against the source in BidsExtension.groovy.
| Entry point | Signature (as called from a Nextflow workflow) |
|---|---|
|
Returns a |
|
Emits |
|
Inner join by default; set |
|
Produces the full cartesian product of left × right items within each matched key group. The key-extractor closures are invoked with one item at a time from their respective channels. Unmatched keys are silently dropped (inner semantics). Emits fused items (key omitted). |
See Channel Operators for worked examples and Source model for the data structures flowing through these operators.
Contributing to the API reference
Any change to the public API in src/main/groovy must add or update the
Groovydoc comment so that the generated reference does not drift from the
implementation. Specifically:
-
New public classes must have a class-level
/** … */block summarising their responsibility. -
New public methods must document all parameters (
@param), the return value (@return), and any thrown exceptions (@throws) where applicable. -
Parameter names in
@paramtags must match the actual parameter names in the source; mismatches break the GroovyDoc generation. -
Methods or classes that are intentionally excluded from the public surface (e.g. internal helpers) must be
privateorprotectedso GroovyDoc omits them automatically. -
The
./gradlew groovydoctask is run at the review gate; the build must complete without warnings before a PR is merged.