Skip to content

ENH: Direct function call for pipeline in Python script #1003

Open
@scholzri

Description

First of all, thank you for creating this amazing pipeline. It's been incredibly helpful in my work.

I'm currently integrating the mne-bids-pipeline into a larger Python script that handles data conversion and trigger recoding. I'd like to know if there is a way to execute specific pipeline steps directly from within my script.

Currently, I'm using the command-line interface like this:

mne_bids_pipeline config.py --steps=preprocessing

Is there a function I can import and call in my Python script that achieves the same result? Something like:

from mne_bids_pipeline import run_pipeline
run_pipeline('config.py', steps=['preprocessing'])

If not, is the recommended approach to use os.system() or subprocess.run() to execute the command-line interface?
Any guidance on the best practice for integrating mne-bids-pipeline steps into custom Python scripts would be greatly appreciated. Thank you!

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions