CCPEM Pipeliner
Guide

Job Catalogue

How job types are named and discovered, with links to each category of jobs


Overview

This page describes how job types are named, structured, and discovered in ccpem-pipeliner, and provides a table of example job categories; for the full list of registered job types, run pipeliner --available_jobs or call get_job_types() from pipeliner.job_factory. Understanding job type names (called process names) is essential when building automated pipelines, writing run.job files, calling the Python API, or authoring custom job plugins. Jobs whose required external programs are absent from the system PATH are still loaded but marked unavailable rather than being silently dropped: get_job_types() still returns them with jobinfo.unavailable_message explaining why, pipeliner --available_jobs lists them under Unavailable jobs, and pipeliner --check_jobs shows the reason.


Prerequisites

Before working with the job catalogue you need:

  • ccpem-pipeliner installed and importable (pip install ccpem-pipeliner; Python ≥ 3.9 required)
  • The pipeliner.check_setup console script available (reinstall with pip install --force-reinstall ccpem-pipeliner if it is missing)
  • Optional external programs (RELION, crYOLO, CTFFIND, MotionCor2, etc.) on your PATH to make the corresponding job types available; jobs whose programs are absent load normally but are marked unavailable

See the installation and configuration pages for details on setting up external programs and environment variables.


Usage

How job type names are structured

Every job type in pipeliner is identified by a process name — a dot-separated string such as relion.motioncorr.own or cryolo.autopick. Process names follow a hierarchical convention:

<software>.<category>.<variant>

For example:

  • relion.class2d.em — RELION EM-algorithm 2D classification
  • relion.ctffind.ctffind4 — RELION CTF estimation using CTFFIND4
  • cryolo.autopick — crYOLO SPA autopicking
  • pipeliner.deposition.onedep — OneDep deposition job

The process name is also the key used in the ccpem_pipeliner.jobs entry-point group (see below), so it must match the class's PROCESS_NAME attribute exactly.


How jobs are discovered

Pipeliner does not maintain a persistent registry of job types. Instead, every call to get_job_types() or new_job_of_type() performs a live lookup of the ccpem_pipeliner.jobs entry-point group using importlib_metadata.

This means:

  • Third-party packages can register new job types without modifying pipeliner's source code — they only need to declare entries under ccpem_pipeliner.jobs in their pyproject.toml.
  • Job discovery reflects whatever packages are installed in the current Python environment at the time of the call.

Import the factory functions from pipeliner.job_factory:

from pipeliner.job_factory import get_job_types, new_job_of_type

List all registered job types:

from pipeliner.job_factory import get_job_types

jobs = get_job_types()
for job in jobs:
    print(job.PROCESS_NAME, "-", job.jobinfo.short_desc)

You can pass a search string to filter results:

relion_jobs = get_job_types(search_term="relion")

get_job_types() returns a List[PipelinerJob] — a list of job instances, not classes. To test for membership by process name, extract PROCESS_NAME from each instance.

Instantiate a specific job type by name:

from pipeliner.job_factory import new_job_of_type

job = new_job_of_type("relion.motioncorr.own")
print(job.jobinfo.is_available)

Passing an unregistered name raises ValueError.


Checking availability from the CLI

To see all registered job types and their availability in your current environment:

pipeliner --check_jobs

This prints each job with its external program name and version, then lists an Unavailable jobs section showing any jobs whose required executables cannot be found.

For a quick installation check (Python version, console scripts, external programs):

pipeliner.check_setup

How unavailability is reported

When a job's required executable is not on PATH at the time the job object is created, the job loads normally as its regular class — it is not replaced by a placeholder. Instead:

  • job.jobinfo.is_available returns False
  • job.jobinfo.unavailable_message returns a string of the form This job has been marked unavailable because: executable '<name>' not found

An UnavailableJob placeholder is created only when loading or instantiating the job class itself raises an exception (for example, due to a missing Python dependency). In that case pipeliner --check_jobs lists the job name with no error-reason lines; the exception is captured in jobinfo.unavailable_message.

Jobs marked unavailable can still be scheduled via the API or CLI — they will fail at execution time when the underlying command is run, not at scheduling time.


Registering a custom job plugin

Third-party job types are registered under the ccpem_pipeliner.jobs entry-point group. In your package's pyproject.toml:

[project.entry-points."ccpem_pipeliner.jobs"]
"mypackage.my_job" = "mypackage.jobs.my_job:MyJobClass"

The entry-point key must equal the class's PROCESS_NAME attribute exactly. After installing your package (pip install .), get_job_types() and new_job_of_type("mypackage.my_job") will find it automatically.


Job categories

Job types are grouped into categories, accessible via job.get_category_label(). The labels below are the exact strings it returns; the jobs themselves are documented on the per-category subpages:

Category labelExample process names
Importrelion.import.movies, relion.import.coordinates, relion.import, relion.importtomo, relion.importtomo.coordinates
Motion Correctionrelion.motioncorr.own, relion.motioncorr.motioncor2, relion.motioncorr.tomo.own
CTF Determinationrelion.ctffind.ctffind4, relion.ctffind.gctf, relion.ctffind.tomo.ctffind4
Automated Particle Pickingrelion.autopick.log, relion.autopick.ref2d, cryolo.autopick, relion.autopick.topaz.pick
2D Classificationrelion.class2d.em, relion.class2d.vdam, relion.class2d.em.helical, relion.class2d.vdam.helical
3D Classificationrelion.class3d, relion.class3d.helical, relion.class3d.multiref, relion.class3d.helical.multiref
3D Refinementrelion.refine3d, relion.refine3d.helical, relion.refine3d.tomo, relion.refine3d.tomo.helical
Map Postprocessingrelion.postprocess
Local Resolution Determinationrelion.localres.own, relion.localres.resmap
Template Matchingltm.template.match, ltm.extract.peaks, ltm.halftomo.localcc
Depositionpipeliner.deposition.onedep, pipeliner.deposition.empiar
Atomic Model Buildmodelcraft.atomic_model_build, modelangelo
Atomic Model Refineservalcat.atomic_model_refine, moorhen.atomic_model_refine, flex_em.atomic_model_refine
Atomic Model Validationpipeliner.atomic_model_validation, molprobity.atomic_model_validation.geometry
Subset Selectionpipeliner.select.random_sample
Automated Class Selectioncinderella.select.class_averages
Continuous Heterogeneitycryodrgn.train_vae
Externalpipeliner.run_external_program

Categories are by processing step, not by data type: tomography jobs share the single-particle labels (for example relion.ctffind.tomo.ctffind4 is in CTF Determination). The table lists examples only; run job.get_category_label() for the label of any job.

See the per-category subpages for complete option lists, input/output nodes, and continuation support for each job.


Examples

List all job types and their availability

from pipeliner.job_factory import get_job_types

for job in get_job_types():
    status = "available" if job.jobinfo.is_available else "unavailable"
    print(f"{job.PROCESS_NAME}: {status}")

Instantiate a job type and inspect its options

from pipeliner.job_factory import new_job_of_type

job = new_job_of_type("relion.class2d.em")
print(job.PROCESS_NAME)          # relion.class2d.em
print(job.jobinfo.short_desc)
print(list(job.joboptions.keys()))

Get default parameters as a dict

from pipeliner.api.api_utils import job_default_parameters_dict

params = job_default_parameters_dict("relion.motioncorr.own")
# params contains '_rlnJobTypeLabel', '_rlnJobIsContinue', '_rlnJobIsTomo',
# and one key per job option, all values as strings
print(params["_rlnJobTypeLabel"])  # relion.motioncorr.own

Create a job from a parameters dict

from pipeliner.job_factory import job_from_dict

params = {
    "_rlnJobTypeLabel": "relion.import.movies",
    "fn_in_raw": "Movies/*.tif",
    "kV": "300",
    "Cs": "2.7",
    "Q0": "0.1",
    "angpix": "0.885",
}
job = job_from_dict(params)
print(job.PROCESS_NAME)

Write and edit a job.star file, then run the job

from pipeliner.api.api_utils import write_default_jobstar, edit_jobstar
from pipeliner.api.manage_project import PipelinerProject

# Generate template
template = write_default_jobstar("relion.import.movies")
# → relion_import_movies_job.star

# Edit parameters (use option keys, not labels)
outfile = edit_jobstar(
    template,
    {"fn_in_raw": "Movies/*.tif", "kV": "300", "angpix": "0.885"},
    "import_movies.job.star",
)

proj = PipelinerProject("default", "MyProject")
job = proj.run_job(outfile, run_in_foreground=True)
print(job.output_dir)

Filter job types by category (search term)

from pipeliner.job_factory import get_job_types

# All crYOLO jobs
cryolo_jobs = get_job_types(search_term="cryolo")
for j in cryolo_jobs:
    print(j.PROCESS_NAME, j.get_category_label())

Check if a specific job's programs are available

from pipeliner.job_factory import new_job_of_type

job = new_job_of_type("relion.ctffind.ctffind4")
if not job.jobinfo.is_available:
    print(job.jobinfo.unavailable_message)

Troubleshooting

A job type I expect to see is missing from get_job_types() / --available_jobs

Symptom: Calling get_job_types() or running pipeliner --available_jobs does not show a job type you installed.

Likely cause: The package that provides the job type was not installed into the same Python environment as ccpem-pipeliner, or its pyproject.toml entry-point group name is wrong.

Fix: Verify the package is installed (pip show <package>) and that its entry-point group is exactly ccpem_pipeliner.jobs (not ccpem-pipeliner.jobs or any other variant). Re-install the plugin package if needed.


new_job_of_type('my.job.type') raises ValueError: Job type 'my.job.type' not found

Symptom: The entry point exists but new_job_of_type cannot locate it.

Likely cause: The entry-point key in pyproject.toml does not exactly match the PROCESS_NAME attribute on the job class, or the package was not installed after you last edited pyproject.toml.

Fix: Confirm that the entry-point key and PROCESS_NAME are identical strings, then run pip install -e . (or pip install . for a non-editable install) in the plugin's source directory to refresh the entry points.


job.jobinfo.is_available is False for a built-in RELION job

Symptom: pipeliner.check_setup or pipeliner --check_jobs shows a job as unavailable, and job.jobinfo.unavailable_message mentions a missing executable.

Likely cause: The required external program (e.g. relion_run_motioncorr, ctffind, MotionCor2) is not on the system PATH at the time pipeliner is imported.

Fix: Add the program's directory to PATH before running pipeliner, or list it in the PIPELINER_ADDITIONAL_PROGRAM_PATHS environment variable. Alternatively, configure PIPELINER_PATH_TO_SOURCE_FILES to point to a shell setup script that sets up the environment. After fixing, re-run pipeliner.check_setup to confirm.


A job appears as UnavailableJob in --check_jobs

Symptom: pipeliner --check_jobs lists a job type under Unavailable jobs with no program lines (no - <cmd>\tERROR: '<cmd>' not found in system path line); the only line under it is - <exception message>, for example - No module named 'xyz'. The job class could not be used at all.

Likely cause: Loading or instantiating the job class itself raised an exception (e.g. a broken plugin or an import error in the plugin package). UnavailableJob is substituted in this case.

Fix: Read the full traceback, which the job_factory logger reports as Error loading job type '<name>' when get_job_types() loads the job types (it is printed when you run pipeliner --check_jobs). Fix the plugin's import errors and re-install it.


pipeliner --default_runjob produces an unexpected filename

Symptom: The generated file is not named as expected.

Cause: The filename is always <process_name_with_dots_replaced_by_underscores>_run.job. For example, relion.import.movies produces relion_import_movies_run.job. Abbreviated or alternate names will fail because they are not valid process names.

Fix: Use the exact process name (e.g. relion.import.movies, not ImportMovies). Note that relion.import is itself a valid process name, for a different job (importing files other than movies, micrographs or coordinates), so it writes relion_import_run.job rather than failing.


edit_jobstar raises a parse error when given a run.job file

Symptom: Calling edit_jobstar(fn_template, ...) with a _run.job file raises File <name> is not a valid STAR file.

Cause: edit_jobstar requires a STAR-format job.star file (such as those produced by write_default_jobstar). It cannot parse the label == value format used in run.job files.

Fix: Use write_default_jobstar('relion.my.job') to generate a job.star template, then pass that file to edit_jobstar. Use write_default_runjob only when you intend to pass the file to the pipeliner --run_job CLI flag or PipelinerProject.run_job().