Outputs#
MEGFlow writes Nextflow execution files under params.megflow.output_dir and
processing derivatives under the dataset preproc_dir. By default:
preproc_dir = <dataset_output_dir>/preprocessed
Top-Level Output Layout#
Path |
Description |
|---|---|
|
Nextflow work directory. |
|
Nextflow execution report for a single-dataset run. |
|
Nextflow timeline for a single-dataset run. |
|
Nextflow process trace. The static report uses it to populate per-subject
|
|
Nextflow driver log when the launcher supplies the documented |
|
Runtime config copied by the distributed Docker entrypoint. Source launches do not create this file automatically. |
|
Portable MEGFlow QC report. Depending on |
|
MEGFlow processing derivatives. |
Corpus Output Layout#
With Docker --corpus or a source config that sets corpus_root, every
dataset receives an isolated output tree. Dataset names are sanitized for use as
directory names, while the corpus report retains the configured display name.
<output_dir>/
|-- datasets/
| |-- <dataset_a>/
| | |-- preprocessed/
| | `-- static_html_report/ # MEG/report stages
| `-- <dataset_b>/
| |-- preprocessed/
| `-- static_html_report/ # MEG/report stages
|-- corpus_static_html_report/
| |-- index.html
| |-- assets/
| |-- data/
| | |-- corpus_summary.json
| | `-- datasets.csv
| |-- datasets/ # bundled portable dataset reports
| `-- nextflow/
| |-- nextflow.log
| |-- report.html
| |-- timeline.html
| `-- trace.txt
`-- nextflow.config
corpus_static_html_report/index.html is the cross-dataset entry point. It
links the dataset reports and provides sortable recording and dataset summaries
for comparison, outlier discovery, and prioritizing manual review. The files
under corpus_static_html_report/nextflow/ describe the complete
Nextflow invocation rather than one dataset. They are stored once and linked
from the corpus report instead of being copied into every dataset report.
An anatomy-only dataset has derivatives and reconstructed anatomy but no
dataset-level static MEG report unless a later MEG or report stage creates
one.
Preprocessed Directory#
Path |
Contents |
|---|---|
|
Continuous preprocessed raw files, ICA-clean raw files, and selected QA plots. |
|
NormMEG-QC summary JSON, component-score CSV, and NMDQ score figure when
|
|
Bad-channel files, detector provenance, bad-segment annotation files, DeepReject provenance when enabled, a recording-wide mask heatmap, and optional detailed artifact review images. |
|
ICA model, component labels, ECG/EOG score files, component figures, and overlay/PSD plots. |
|
Epoch FIF files, rejection logs, and epoch-level figures. |
|
|
|
MEG-MRI transform, coregistration distance CSV, and staged coregistration figures. |
|
Forward model outputs and head model figures. |
|
Source reconstruction outputs and visualization figures. |
|
|
|
DeepPrep outputs when |
|
Generated pseudo T1 input when |
FreeSurfer-format anatomy is written to the configured fs_subjects_dir.
In a corpus run without an explicit override this is normally under
<output_dir>/smri/<dataset_name>/; it is not a recording derivative.
Important Sidecar Files#
File pattern |
Meaning |
|---|---|
|
Continuous output from OSL preprocessing. |
|
NormMEG-QC NMDQ score, score metadata, family scores, and processing-gate status. |
|
NormMEG-QC component values and reference-calibrated subscores. |
|
NMDQ score and metric-family score figure. |
|
One bad channel name per line. |
|
Per-channel detector provenance showing which enabled method marked each final bad channel. |
|
MNE annotation file containing bad time spans. |
|
DeepReject input preprocessing, folds, thresholds, channel probabilities, bad-channel decisions, bad intervals, and runtime settings. It is written only when the DeepReject branch runs successfully. |
|
Whole-recording channel-by-time mask overview. This compact image is
generated even when |
|
Fitted ICA model. |
|
Final ICA component indices selected for exclusion. In automatic mode this is the union of enabled ECG, EOG, and outlier categories; a preserved manual review may replace that automatic union. |
|
Enabled-category |
|
Continuous raw file after ICA application. |
|
Epoch output. |
|
Rejected epoch indices and estimated remaining epoch count. |
|
Noise covariance estimate. |
|
LCMV data covariance from the exact source Raw/Epochs. This file is not generated for minimum-norm-only runs. |
|
Resolved target-rank dictionary, ordered common-channel list, and source input mode shared by covariance and source reconstruction. |
|
Coregistration distance summary in mm. |
|
MEG-MRI transform used by forward modeling. |
|
Pipeline mode, selected stages, path snapshot, and runtime metadata. |
The exact set of outputs depends on the effective steps value in
params.megflow. For example,
meg_artifacts does not produce ICA, epoch, covariance, forward, or source
outputs, while report only rebuilds the static report from existing files.
Artifact Image Policy#
artifacts.artifact_images_enabled controls detailed waveform and detector
review figures; it does not disable the compact artifact-mask heatmap. The
heatmap gives reports a consistent recording-wide summary without incurring the
cost of all detailed figures. artifact_image_n_jobs controls parallel image
generation only and does not change artifact decisions. Its automatic value,
and any explicit upper bound, cannot exceed the detect_artifacts CPU
allocation.
Bad-segment sidecars contain annotations, not shortened data. Samples remain in
the continuous FIF. The normal ICA path carries them into the cleaned raw; the
meg_epochs,skip_ica path loads the bad-channel and bad-segment sidecars into
the preprocessed raw immediately before epoching. ICA fitting and epoch
construction exclude annotated spans according to their own
reject_by_annotation behavior. See Bad Segments: Marking vs Exclusion for the exact
distinction between marking and later exclusion.