preflight
tit.pre.preflight ¶
Preprocessing output preflight and rerun policy helpers.
PreprocessingOutput
dataclass
¶
PreprocessingOutput(subject_id: str, step: str, label: str, path: Path, cleanup_paths: tuple[Path, ...] = ())
Existing output for one preprocessing step.
PreprocessingInputProblem
dataclass
¶
Missing or invalid input for one selected preprocessing step.
missing_inputs_for_step ¶
missing_inputs_for_step(project_dir: str, subject_id: str, step: str) -> list[PreprocessingInputProblem]
Return missing required inputs for one subject and preprocessing step.
Source code in tit/pre/preflight.py
find_missing_preprocessing_inputs ¶
find_missing_preprocessing_inputs(project_dir: str, subject_ids: Iterable[str], *, steps: Sequence[str] | None = None, convert_dicom: bool = False, create_m2m: bool = False, run_recon: bool = False, run_qsiprep: bool = False, run_qsirecon: bool = False, extract_dti: bool = False, skip_existing_outputs: bool = False) -> list[PreprocessingInputProblem]
Return missing inputs that can be detected before running subprocesses.
Source code in tit/pre/preflight.py
existing_outputs_for_step ¶
existing_outputs_for_step(project_dir: str, subject_id: str, step: str) -> list[PreprocessingOutput]
Return existing outputs for one subject and preprocessing step.
Source code in tit/pre/preflight.py
selected_preprocessing_steps ¶
selected_preprocessing_steps(*, convert_dicom: bool = False, create_m2m: bool = False, run_recon: bool = False, run_qsiprep: bool = False, run_qsirecon: bool = False, extract_dti: bool = False) -> list[str]
Return output-producing steps enabled by the current run options.
Source code in tit/pre/preflight.py
find_existing_preprocessing_outputs ¶
find_existing_preprocessing_outputs(project_dir: str, subject_ids: Iterable[str], *, steps: Sequence[str] | None = None, convert_dicom: bool = False, create_m2m: bool = False, run_recon: bool = False, run_qsiprep: bool = False, run_qsirecon: bool = False, extract_dti: bool = False) -> list[PreprocessingOutput]
Return outputs that already exist for selected subjects and steps.
Source code in tit/pre/preflight.py
remove_preprocessing_output ¶
remove_preprocessing_output(output: PreprocessingOutput) -> None
Remove an existing preprocessing output before an explicit rerun.