CCPEM Pipeliner
Concept

Intended Audience

Who ccpem-pipeliner is for: facility automation engineers, software integrators and job-plugin authors


Overview

This page describes who ccpem-pipeliner is designed for and how different roles interact with it. Understanding the intended audience helps you decide which parts of the library — CLI commands, Python API, or plugin extension points — are most relevant to your work. Whether you are automating facility pipelines, integrating pipeliner into a larger processing system, or writing custom job types, this page maps your role to the right entry points.


Content

Primary audience

ccpem-pipeliner is aimed at developers and facility engineers who need to integrate cryoEM image-processing workflows into larger automation systems, run processing pipelines headlessly from scripts, or extend the pipeliner with new job types. You are expected to be comfortable with Python at an intermediate level and familiar with the general concepts of cryoEM data processing (motion correction, CTF estimation, particle picking, refinement, and so on), even if you are not a domain expert.

The library is not primarily aimed at bench scientists who want to click through a graphical interface. Those users are better served by the Doppio GUI or the RELION GUI, both of which can open and continue projects that pipeliner creates. If you are building the automation layer that those users rely on, or writing a new processing step they will invoke, you are in the right place.

Three typical roles

Facility automation engineer

You operate a cryo-EM facility (for example, at a site such as eBIC/DLS) and need on-the-fly processing that starts automatically as data arrives from the microscope. Your primary interest is in the Python API and the pipeliner CLI, which let you:

  • Create and manage projects programmatically from PipelinerProject (imported from pipeliner.api.manage_project).
  • Schedule, run, and sequence jobs using run_job(), schedule_job(), continue_job(), and wait_for_job_to_finish().
  • Build automated schedule loops with run_schedule() and stop_schedule().
  • Archive completed workflows with create_archive() and generate metadata or reference reports with prepare_metadata_report() and create_reference_report().

You will also care about HPC cluster integration: queue submission is controlled per-job through the do_queue job option (defaulting to the value of PIPELINER_QUEUE_USE), and the qsub_template and qsub_command settings (defaulted to an empty template and qsub respectively) let you adapt pipeliner to your site's scheduler (SLURM, SGE, or others).

Software integrator

You are embedding pipeliner inside another tool — a data-management system, a laboratory information system, or a higher-level orchestration framework. Your focus is the importable Python library (import pipeliner). Key surfaces you will use:

  • job_from_dict() from pipeliner.job_factory, and write_default_jobstar() / edit_jobstar() from pipeliner.api.api_utils, to construct job parameter sets programmatically.
  • get_job_types() and new_job_of_type() from pipeliner.job_factory to discover available job types and instantiate them.
  • ProjectGraph from pipeliner.project_graph to read or manipulate the pipeline graph (the default_pipeline.star STAR file) directly.
  • The job status sentinel files (PIPELINER_JOB_EXIT_SUCCESS, PIPELINER_JOB_EXIT_FAILED, PIPELINER_JOB_EXIT_ABORTED) and PipelinerProject.update_job_status() to track and set job states.

Because pipeliner is a library/SDK (installed with pip install ccpem-pipeliner), you import and call it directly — there is no daemon or server process to manage.

Job-plugin author

You have a new processing algorithm or tool that you want to expose through pipeliner's job system so that it appears alongside built-in jobs in the Doppio GUI and in automation scripts. Your work centres on the ccpem_pipeliner.jobs entry-point extension point.

You will:

  1. Write a Python class that subclasses PipelinerJob, declares PROCESS_NAME and OUT_DIR attributes, and implements create_output_nodes() and get_commands().
  2. Register it under the ccpem_pipeliner.jobs group in your package's pyproject.toml, with the entry-point key matching the class's PROCESS_NAME exactly.
  3. Install your package into the same Python environment as pipeliner; discovery via get_job_types() or new_job_of_type() happens automatically at call time — there is no persistent registry and no need to modify the core package.

Plugin authors also need to understand JobInfo, ExternalProgram, and create_results_display_object() in order to declare program dependencies, mark jobs as unavailable when executables are missing, and produce display outputs for the Doppio GUI.

What you are expected to know

TopicLevel required
Python (classes, packaging, entry points)Intermediate
pip and virtual environmentsComfortable
CryoEM processing concepts (motion correction, CTF, picking, refinement)Familiar
HPC job schedulers (SLURM, SGE)Helpful for facility work
STAR file formatHelpful for graph and job-file work
RELION project conventionsHelpful — pipeliner projects are fully RELION-compatible

You do not need to understand the Doppio or RELION GUIs to use pipeliner programmatically, though knowing that the projects you create are viewable there is useful context.

What pipeliner does not cover

ccpem-pipeliner provides the business-logic and execution layer. It does not include:

  • The Doppio graphical interface itself (a separate CCP-EM component).
  • The underlying processing programs (RELION, MotionCor2, CTFFIND, crYOLO, etc.) — these must be installed separately and be on PATH or declared via the relevant PIPELINER_*_EXECUTABLE environment variables.
  • A web server, REST API, or containerised service — pipeliner is a library installed with pip and called in-process or from shell scripts.

Verify your installation and program availability at any time by running:

pipeliner.check_setup

This prints four sections: a Python version check, an available job-types check (with paths to each found executable), a pipeliner console-scripts check, and a final setup report.


Examples

Check whether your installation sees the job types you need

Run the setup checker from a terminal after installing ccpem-pipeliner:

pipeliner.check_setup

The command prints four sections: a Python version check, a list of available job types with their executable paths, a pipeliner console-script check, and a final setup report. If a console script is missing, reinstall with:

pip install --force-reinstall ccpem-pipeliner

Discover registered job types from Python

from pipeliner.job_factory import get_job_types

jobs = get_job_types()
for job in jobs:
    status = "available" if job.jobinfo.is_available else "unavailable"
    print(job.PROCESS_NAME, "-", status)

Pass a search string to filter results:

motion_jobs = get_job_types(search_term="motioncorr")

Open an existing project and inspect it

import os
from pipeliner.api.manage_project import PipelinerProject

os.chdir("/path/to/my/project")
proj = PipelinerProject()  # opens the project in the current directory

Run a job programmatically

import os
from pipeliner.api.manage_project import PipelinerProject
from pipeliner.api.api_utils import job_default_parameters_dict

os.chdir("/path/to/my/project")
proj = PipelinerProject(make_new_project=True)

# Build a parameters dict for a movies-import job
params = job_default_parameters_dict("relion.import.movies")
params["fn_in_raw"] = "Movies/*.tiff"
params["kV"] = "300"
params["Cs"] = "2.7"
params["Q0"] = "0.1"
params["angpix"] = "1.06"

job = proj.run_job(params, run_in_foreground=True)
print(job.output_dir)  # e.g. Import/job001/

Register a custom job plugin

In your package's pyproject.toml:

[project.entry-points."ccpem_pipeliner.jobs"]
"myfacility.denoise" = "myfacility.pipeliner_jobs.denoise:DenoiseJob"

The key "myfacility.denoise" must exactly match the PROCESS_NAME attribute declared in DenoiseJob. After running pip install -e . (or the equivalent), the job appears in pipeliner --available_jobs and can be instantiated via new_job_of_type("myfacility.denoise").


Related concepts
  • Installation and verification — how to install ccpem-pipeliner with pip and run pipeliner.check_setup to confirm the setup.
  • Projects and the pipeline graph — the structure of a pipeliner project directory, the default_pipeline.star file, and how jobs connect through nodes.
  • Running and continuing jobs — using PipelinerProject.run_job(), continue_job(), and wait_for_job_to_finish() to sequence processing steps.
  • Queue submission — configuring qsub_template, qsub_command, and per-job do_queue options to submit jobs to HPC schedulers.
  • Writing a custom job plugin — subclassing PipelinerJob, implementing get_commands() and create_output_nodes(), and registering the plugin under the ccpem_pipeliner.jobs entry-point group.
  • Viewing results in Doppio or RELION — how completed pipeliner projects are opened and navigated in the CCP-EM Doppio GUI or the RELION GUI without modification.
  • Settings and environment variables — the ccpem-pipeliner-settings.json file, XDG_CONFIG_HOME, and the PIPELINER_* / RELION_* environment variable fallbacks for executables, queue commands, and MPI settings.