## Add pipeio
Add pipeio.matlab module for MATLAB rule wiring¶
Pipeio needs a pipeio.matlab module that provides a generalized matlab2shell() utility for wiring MATLAB functions into Snakemake shell: directives.
Context¶
pixecog's tests/snakemake-matlab/matlab_utils.py has a proof-of-concept that works but is hardcoded. The pattern is valuable: compose a MATLAB -batch command string that Snakemake can call.
Requirements¶
pipeio.matlab.matlab2shell()— generalized version:- MATLAB binary path from
runtime.matlab_binconfig key (likeruntime.projio_pythonandruntime.datalad_bin) - Configurable startup script path (default:
code/startup.m) - Configurable path reset behavior
-
No hardcoded paths
-
runtime.matlab_binconfig key — add to projio's runtime config schema alongsideprojio_pythonanddatalad_bin -
Documentation — add a section to pipeio pipeline-docs or create a skill showing the MATLAB rule wiring pattern (Snakefile
shell:directive usingmatlab2shell()) -
Reference Snakefile pattern:
rule sleepstates: shell: matlab2shell("functionBrainStateClass_pipeline(pwd,'{wildcards.rec}',{params.nchannel},{params.fs},'{output.mat}','{output.png}')") + " >> {log} 2>&1"
Reference¶
- Source:
pixecog/tests/snakemake-matlab/matlab_utils.py - Snakefile:
pixecog/tests/snakemake-matlab/Snakefile
Related Notes¶
- issue-arash-20260407-162859-574826.md — Directly related: adding runtime.matlab_bin config key alongside projio_python and datalad_bin touches the same runtime env configuration schema being discussed there