CCPEM Pipeliner
Guide

Usage Patterns

Common ways to use pipeliner from the command line and from Python scripts


Overview

This page shows you the most common ways to use ccpem-pipeliner from both the command line and from Python scripts. Whether you are running a single processing job interactively, chaining jobs into an automated workflow, or integrating pipeliner into a facility pipeline, the patterns here give you a practical starting point.


Prerequisites

Before following the examples on this page you need:

  • Python ≥ 3.9 (CI-tested on 3.10; classifiers cover 3.9–3.14)
  • ccpem-pipeliner installed: pip install ccpem-pipeliner
  • A working directory that is (or will become) a pipeliner project
  • External programs (e.g. RELION) on your PATH for any job type you intend to run — run pipeliner.check_setup after installation to verify
  • Optional: an MPI runtime (e.g. OpenMPI) for MPI-parallel jobs; an HPC scheduler (SLURM, SGE) for cluster submission

See the Installation and Configuration pages for detailed setup instructions.


Usage

Verifying the installation

Run the setup checker at any time to confirm that the console scripts are present and that pipeliner can locate the external programs it needs:

pipeliner.check_setup

The output is organised into four sections: Python version check, available job-type check, pipeliner console-script check, and a final report. Any job type whose required executable is missing is shown as Unavailable with the specific program name that could not be found.

If console scripts are missing, reinstall with:

pip install --force-reinstall ccpem-pipeliner

Creating a project

From the command line

Initialise a new project in the current directory. Omitting the project name uses the default pipeline name default (recommended):

pipeliner --new_project

This writes default_pipeline.star and the .CCPEM_pipeliner_project marker file in the current directory. It does not create a new subdirectory.

If you already have a RELION project, simply cd into it and use PipelinerProject or the CLI directly — do not run --new_project when a pipeline file already exists.

From Python

import os
from pipeliner.api.manage_project import PipelinerProject

os.makedirs("/data/my_project", exist_ok=True)
os.chdir("/data/my_project")

# make_new_project=True creates the pipeline file if none exists
proj = PipelinerProject(
    pipeline_name="default",
    project_name="My SPA project",
    description="Test run on dataset XYZ",
    make_new_project=True,
)

PipelinerProject operates on the current working directory; it does not accept a path argument.


Discovering available job types

# List all registered job types
pipeliner --available_jobs

# Filter by a search string
pipeliner --available_jobs ctffind

From Python, get_job_types() returns a list of job instances:

from pipeliner.job_factory import get_job_types

for job in get_job_types():
    print(job.PROCESS_NAME, "—", job.jobinfo.short_desc)

Running a processing job

Pattern 1 — generate a template, edit it, run it

This is the recommended CLI workflow for one-off jobs.

Step 1. Generate a run.job template with default values:

pipeliner --default_runjob relion.import.movies
# Writes: relion_import_movies_run.job

Step 2. Open the file and edit parameter values. Each line has the format <option label> == <value>:

job_type == relion.import.movies
is_continue == false
is_tomo == false
Raw input files: == Movies/*.tif
Are these multi-frame movies? == Yes
Optics group name: == opticsGroup1
MTF of the detector: == 
Pixel size (Angstrom): == 1.06
Voltage (kV): == 300
Spherical aberration (mm): == 2.7
Amplitude contrast: == 0.1
...

Important: Labels must match exactly what --default_runjob printed. Editing a label does not raise an error: the line is ignored, the option silently keeps its default value, and only a warning <file>; no value for `<label>` using default value: <default> is logged.

Step 3. Run the job:

pipeliner --run_job relion_import_movies_run.job

This always creates a new job with the next sequential number (e.g. Import/job001/). To overwrite an existing job of the same type:

pipeliner --run_job relion_import_movies_run.job --overwrite Import/job001/

Pattern 2 — Python API with a parameters dict

Use job_default_parameters_dict() to get a fully populated dict, modify values, and call run_job().

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

os.chdir("/data/my_project")
proj = PipelinerProject()

# Get default parameters for movie import
params = job_default_parameters_dict("relion.import.movies")

# Override specific values (keys are option names, not labels)
params["fn_in_raw"] = "Movies/*.tif"
params["angpix"] = "1.06"
params["kV"] = "300"
params["Cs"] = "2.7"
params["Q0"] = "0.1"

# run_job returns a PipelinerJob; it launches in the background by default
job = proj.run_job(params)
print("Scheduled as:", job.output_dir)

To wait for the job to finish before continuing (useful for sequential scripting):

final_status = proj.wait_for_job_to_finish(job)
print("Job finished with status:", final_status)

Pattern 3 — Python API with write_default_jobstar / edit_jobstar

For STAR-file–based workflows (e.g. integrating with tools that read .star files):

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

os.chdir("/data/my_project")
proj = PipelinerProject()

# Write a default job.star template
template = write_default_jobstar("relion.ctffind.ctffind4")
# Returns e.g. 'relion_ctffind_ctffind4_job.star'

# Edit specific parameters (keys are option names)
out_star = edit_jobstar(
    fn_template=template,
    params_to_change={
        "input_star_mics": "MotionCorr/job002/corrected_micrographs.star",
        "box": "512",
        "resmin": "30",
        "resmax": "5",
        # needed because MotionCorr writes float16 micrographs by default
        "use_given_ps": "Yes",
    },
    out_fn="my_ctffind_job.star",
)

# Run from the edited star file
job = proj.run_job(out_star)

edit_jobstar requires a .star file as its template. Passing a run.job file raises ValueError('File <file> is not a valid STAR file. ...').


Continuing an existing job

Some job types support continuation (e.g. relion.import.movies, relion.motioncorr.own, relion.class2d.em, relion.refine3d). Continuation re-uses the existing job directory and picks up from where the job left off.

CLI

# Edit the continue_job.star in the job directory first (if needed),
# then continue:
pipeliner --continue_job Import/job001/

For optimiser-based jobs (Class2D, Class3D, Refine3D, Multibody), you must set fn_cont in continue_job.star to point to the correct _optimiser.star iteration file before calling --continue_job.

Python

Use get_continuation_job() to obtain a job object with continuation parameters pre-filled (including fn_cont for Class2D, Class3D, InitialModel and Refine3D jobs), then run it:

from pipeliner.api.manage_project import PipelinerProject
import os

os.chdir("/data/my_project")
proj = PipelinerProject()

# get_continuation_job raises ValueError if job is not Succeeded,
# and NotImplementedError if the job type cannot be continued
cont_job = proj.get_continuation_job("MotionCorr/job002/")

# Optionally modify options before running
cont_job.joboptions["nr_threads"].value = "8"

result = proj.run_job(cont_job)
proj.wait_for_job_to_finish(result)

Alternatively, use continue_job() directly (you are responsible for setting fn_cont in continue_job.star for optimiser jobs):

result = proj.continue_job("Class2D/job005/")

Scheduling jobs without running immediately

schedule_job() registers a job in the pipeline in the Scheduled state without executing it. This is useful for building up a queue of jobs to run later.

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

os.chdir("/data/my_project")
proj = PipelinerProject()

params = job_default_parameters_dict("relion.motioncorr.own")
params["input_star_mics"] = "Import/job001/movies.star"
params["dose_per_frame"] = "1.2"

scheduled_job = proj.schedule_job(params, alias="motioncorr_round1")
print("Scheduled:", scheduled_job.output_dir)

# Later, run the scheduled job
running_job = proj.run_scheduled_job(scheduled_job)
proj.wait_for_job_to_finish(running_job)

Building automated workflow scripts

For on-the-fly or batch processing, you can chain jobs using run_schedule(). First schedule all the jobs, then pass their identifiers to run_schedule(). run_schedule() runs the jobs in the calling process and returns only when the schedule has finished or stopped.

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

os.chdir("/data/my_project")
proj = PipelinerProject()

# Schedule import
import_params = job_default_parameters_dict("relion.import.movies")
import_params["fn_in_raw"] = "Movies/*.tif"
import_params["angpix"] = "0.885"
import_params["kV"] = "300"
import_params["Cs"] = "2.7"
import_params["Q0"] = "0.1"
job_import = proj.schedule_job(import_params)

# Schedule motion correction
mc_params = job_default_parameters_dict("relion.motioncorr.own")
mc_params["input_star_mics"] = job_import.output_dir + "movies.star"
mc_params["dose_per_frame"] = "1.2"
job_mc = proj.schedule_job(mc_params)

# Schedule CTF estimation
ctf_params = job_default_parameters_dict("relion.ctffind.ctffind4")
ctf_params["input_star_mics"] = job_mc.output_dir + "corrected_micrographs.star"
# needed because MotionCorr writes float16 micrographs by default
ctf_params["use_given_ps"] = "Yes"
job_ctf = proj.schedule_job(ctf_params)

# Run the three scheduled jobs sequentially under one named schedule
sched_name = proj.run_schedule(
    fn_sched="my_preprocessing",
    job_ids=[job_import.output_dir, job_mc.output_dir, job_ctf.output_dir],
    nr_repeat=1,
    minutes_wait=0,
    seconds_wait_after=5,
)
print("Schedule finished:", sched_name)

From the CLI, the equivalent is:

pipeliner --run_schedule --name my_preprocessing \
  --jobs Import/job001/ MotionCorr/job002/ CtfFind/job003/

Stop a running schedule:

pipeliner --stop_schedule my_preprocessing

Managing job status

Aborting a running job

pipeliner --abort_job MotionCorr/job002/
proj.abort_job("MotionCorr/job002/")

Setting job status manually

Use substrings of success, failed, aborted, scheduled, or running:

pipeliner --set_status CtfFind/job003/ success

Note: finished is not a valid status value.

From Python, the API uses capitalised status strings:

proj.update_job_status("CtfFind/job003/", "Succeeded")

Setting an alias

pipeliner --set_alias MotionCorr/job002/ mc_pass1
proj.set_alias("MotionCorr/job002/", "mc_pass1")

Cleanup, deletion, and archiving

Cleaning up intermediate files

# Clean specific jobs
pipeliner --cleanup MotionCorr/job002/ CtfFind/job003/

# Harsh cleanup (removes more files)
pipeliner --cleanup MotionCorr/job002/ --harsh

# Clean all jobs
pipeliner --cleanup ALL

From Python (full job names required — short forms are not resolved by run_cleanup()):

proj.run_cleanup(["MotionCorr/job002/", "CtfFind/job003/"], harsh=False)
proj.cleanup_all(harsh=False)

Cleaned files are moved to Trash/Cleanup/ and can be restored:

pipeliner --restore_cleaned_files MotionCorr/job002/
proj.restore_from_cleanup("MotionCorr/job002/")

Deleting and restoring jobs

pipeliner --delete_job CtfFind/job003/
pipeliner --undelete_job CtfFind/job003/
proj.delete_job("CtfFind/job003/")
proj.undelete_job("CtfFind/job003/")

Empty the trash permanently (cannot be undone):

pipeliner --empty_trash
PipelinerProject.empty_trash()  # staticmethod; returns True on success

Archiving a project

# Simple archive (directory structure + parameter files only)
pipeliner --simple_archive Refine3D/job010/

# Full archive (all job output files included)
pipeliner --full_archive Refine3D/job010/

From Python:

# Simple archive (full=False, the default)
archive_file = proj.create_archive("Refine3D/job010/", full=False, tar=True)
print("Archive written to:", archive_file)

# Full archive
archive_file = proj.create_archive("Refine3D/job010/", full=True, tar=True)

The returned string is a path under ProjectArchives/ with a date-time tag (e.g. ProjectArchives/20241015143022_project_archive.tar.gz). create_archive() returns '' if the terminal job is not found.


Generating reports and references

Literature reference reports

pipeliner --references_report Refine3D/job010/
output_file, njobs = proj.create_reference_report("Refine3D/job010/")
print(f"Reference report written to {output_file} covering {njobs} jobs")

Reports are written under ReferenceReports/.

Metadata reports

pipeliner --metadata_report Refine3D/job010/
output_file, njobs = proj.prepare_metadata_report(jobname="Refine3D/job010/")

Reports are written under MetadataReports/.

Generating a tutorial document from a completed project

# Run from inside the completed project directory
pipeliner.make_project_tutorial --job Refine3D/job010/

This reads the existing project and writes a dated .rst tutorial document (e.g. 20241015_doppio_tutorial.rst) for rerunning the workflow up to the specified terminal job. The --job flag is required.


Preparing depositions

EMPIAR deposition

# Include all data types by default
pipeliner --empiar_deposition Refine3D/job010/

# Include only movies and particles
pipeliner --empiar_deposition Refine3D/job010/ --empiar_movies --empiar_parts

Output is written to EMPIAR/<datetime>_EMPIAR.json. Submission must be done separately via the EMPIAR web interface.

From Python:

output_path = proj.prepare_project_empiar_deposition(
    terminal_job="Refine3D/job010/",
    empiar_do_mov=True,
    empiar_do_mics=True,
    empiar_do_parts=True,
    empiar_do_rparts=True,
)
print("EMPIAR deposition file:", output_path)

OneDep deposition

from pipeliner.api.manage_project import PipelinerProject
import os

os.chdir("/data/my_project")
proj = PipelinerProject()

output_file, validation_errors = proj.prepare_project_onedep_deposition(
    model="PostProcess/job012/postprocess.mmcif",
    primary_map="PostProcess/job012/postprocess.mrc",
    halfmaps=[
        "Refine3D/job010/run_half1_class001_unfil.mrc",
        "Refine3D/job010/run_half2_class001_unfil.mrc",
    ],
    sequences=["sequence.fasta"],
    depo_id="deposition",
)
if validation_errors:
    for err in validation_errors:
        print("Validation error:", err)

To submit, run and then continue a pipeliner.deposition.onedep job with submit_to_onedep set to Yes.


Recovering a corrupted project

If the pipeline graph becomes inconsistent (e.g. after a crash), restore it from per-job backups:

pipeliner.recover_project
# Add -y / --assume-yes to skip the confirmation prompt
pipeliner.recover_project --assume-yes

This restores default_pipeline.star from the newest per-job backup copy and removes .relion_lock. Jobs scheduled after the backup point are lost. The command requires default_pipeline.star to already exist in the project directory.


Merging projects

Combine two or more projects into one. Run from any directory:

pipeliner.merge_projects \
  --old_projects /data/proj_A /data/proj_B \
  --new_project /data/merged_project

After merging, the sub-project directories can be viewed in Doppio but must not have new jobs added to them.


Viewing results

Projects created by pipeliner are fully compatible with the RELION GUI and the CCP-EM Doppio graphical interface. Open Doppio and point it at your project directory to inspect job results, visualise the pipeline graph, and continue jobs interactively.


Examples

Example 1 — Verify installation

pipeliner.check_setup

Example 2 — Initialise a new project and run movie import

mkdir /data/spa_project && cd /data/spa_project
pipeliner --new_project
pipeliner --default_runjob relion.import.movies
# Edit relion_import_movies_run.job, then:
pipeliner --run_job relion_import_movies_run.job

Example 3 — Full preprocessing script (Python)

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

os.chdir("/data/spa_project")
proj = PipelinerProject(make_new_project=True)

# --- Import ---
imp = job_default_parameters_dict("relion.import.movies")
imp["fn_in_raw"] = "Movies/*.tif"
imp["angpix"] = "0.885"
imp["kV"] = "300"
imp["Cs"] = "2.7"
imp["Q0"] = "0.1"
job_imp = proj.run_job(imp, run_in_foreground=True)
# job_imp.output_dir == 'Import/job001/'

# --- Motion correction ---
mc = job_default_parameters_dict("relion.motioncorr.own")
mc["input_star_mics"] = job_imp.output_dir + "movies.star"
mc["dose_per_frame"] = "1.2"
job_mc = proj.run_job(mc, run_in_foreground=True)

# --- CTF estimation ---
ctf = job_default_parameters_dict("relion.ctffind.ctffind4")
ctf["input_star_mics"] = job_mc.output_dir + "corrected_micrographs.star"
# MotionCorr writes float16 micrographs by default, so use its power spectra
ctf["use_given_ps"] = "Yes"
job_ctf = proj.run_job(ctf, run_in_foreground=True)

print("Preprocessing complete.")
print("CTF output:", job_ctf.output_dir)

Example 4 — Edit a job.star template and run it

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

os.chdir("/data/spa_project")
proj = PipelinerProject()

template = write_default_jobstar("relion.ctffind.ctffind4")
edited = edit_jobstar(
    fn_template=template,
    params_to_change={
        "input_star_mics": "MotionCorr/job002/corrected_micrographs.star",
        "resmax": "4",
        # needed because MotionCorr writes float16 micrographs by default
        "use_given_ps": "Yes",
    },
    out_fn="ctffind_edited.star",
)
job = proj.run_job(edited)

Example 5 — Schedule a named pipeline and wait

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

os.chdir("/data/spa_project")
proj = PipelinerProject()

# Schedule jobs
p1 = job_default_parameters_dict("relion.import.movies")
p1["fn_in_raw"] = "Movies/*.tif"
p1["angpix"] = "1.06"
p1["kV"] = "300"
p1["Cs"] = "2.7"
p1["Q0"] = "0.1"
j1 = proj.schedule_job(p1)

p2 = job_default_parameters_dict("relion.motioncorr.own")
p2["input_star_mics"] = j1.output_dir + "movies.star"
p2["dose_per_frame"] = "1.0"
j2 = proj.schedule_job(p2)

proj.run_schedule(
    fn_sched="batch_01",
    job_ids=[j1.output_dir, j2.output_dir],
    seconds_wait_after=5,
)

Example 6 — Continue a motion correction job via CLI

# 1. Inspect or edit the continuation parameters:
nano MotionCorr/job002/continue_job.star

# 2. Continue the job:
pipeliner --continue_job MotionCorr/job002/

Example 7 — Overwrite an existing job

# Regenerate Import/job001 with new parameters
pipeliner --default_runjob relion.import.movies
# Edit relion_import_movies_run.job ...
pipeliner --run_job relion_import_movies_run.job --overwrite Import/job001/

Example 8 — Cleanup and archive

# Free disk space from motion correction
pipeliner --cleanup MotionCorr/job002/

# Create a full archive up to the refinement terminal job
pipeliner --full_archive Refine3D/job008/
from pipeliner.api.manage_project import PipelinerProject
import os

os.chdir("/data/spa_project")
proj = PipelinerProject()

proj.run_cleanup(["MotionCorr/job002/"], harsh=False)
archive = proj.create_archive("Refine3D/job008/", full=True)
print("Archive:", archive)

Example 9 — Query job types programmatically

from pipeliner.job_factory import get_job_types, new_job_of_type

# List all available job types
for job in get_job_types():
    avail = "OK" if job.jobinfo.is_available else "UNAVAILABLE"
    print(f"{job.PROCESS_NAME:<45} [{avail}]")

# Inspect a specific job type
job = new_job_of_type("relion.ctffind.ctffind4")
print(job.jobinfo.short_desc)
print(job.jobinfo.documentation)

Example 10 — Resolve a short job name

CLI flags (--continue_job, --set_status, etc.) resolve short forms automatically. In Python, call parse_procname() first:

from pipeliner.api.manage_project import PipelinerProject
import os

os.chdir("/data/spa_project")
proj = PipelinerProject()

# Resolve 'job002' or '2' to the full name like 'MotionCorr/job002/'
full_name = proj.parse_procname("job002")
print(full_name)  # e.g. MotionCorr/job002/

# Now use the full name with API methods
proj.update_job_status(full_name, "Succeeded")

Troubleshooting

Console scripts not found after installation

Symptom: Running pipeliner or pipeliner.check_setup gives command not found.

Cause: The entry-point console scripts were not installed correctly, or the environment's bin/ directory is not on PATH.

Fix:

pip install --force-reinstall ccpem-pipeliner
# Then verify:
pipeliner.check_setup

Also ensure the Python environment's bin/ directory is on your PATH.


FileNotFoundError when opening a project

Symptom: PipelinerProject() raises FileNotFoundError: Could not find a project to open in directory ...

Cause: The current working directory does not contain a default_pipeline.star file or a .CCPEM_pipeliner_project marker.

Fix: cd into the correct project directory before instantiating PipelinerProject, or pass make_new_project=True to create a new project.


ValueError when creating a new project

Symptom: pipeliner --new_project raises an error saying the pipeline file already exists.

Cause: A default_pipeline.star file already exists in the current directory.

Fix: Either cd into an empty directory, or open the existing project with PipelinerProject() (no --new_project flag needed).


ValueError: Job cannot be run because: File <path> not found when queue submission is enabled

Symptom: pipeliner --run_job, proj.run_job() or continue_job() raises this error and no job is created.

Cause: The job's do_queue option is Yes but its queue submission template option (qsubscript, labelled Standard submission script: in a run.job file) is empty or points to a file that does not exist. Input files, including this template, are checked before the job is created. (RuntimeError: Error starting job <dir>, caused by Error reading template submission script in: <path>, only happens when a job that was already scheduled is started with run_scheduled_job() and the template can no longer be read; that job is then marked Failed.) The PIPELINER_QUEUE_USE setting does not cause this by itself: it only sets the default value of do_queue in newly created job files. Likewise PIPELINER_QSUB_TEMPLATE (the qsub_template setting) only supplies the default qsubscript for newly created job files.

Fix: Set qsubscript to a valid template path in the job's job.star file or parameters dict, or the Standard submission script: line in its run.job file (or set PIPELINER_QSUB_TEMPLATE / qsub_template in the settings file before generating the job file), or set do_queue to No (Submit to queue? == No in a run.job file).


ValueError: Cannot wait for completion when submitting jobs to a queue

Symptom: Calling proj.run_job(params, run_in_foreground=True) raises this error.

Cause: The job's do_queue option is set to Yes, and run_in_foreground=True is incompatible with queue submission.

Fix: Set do_queue to No in the parameter dictionary or job.star file (in a run.job file the line is Submit to queue? == No), or remove run_in_foreground=True and use wait_for_job_to_finish() instead.


An edited value in a run.job file has no effect

Symptom: pipeliner --run_job my_file.job runs, but a value you edited is not used and the option keeps its default.

Cause: An option label in the run.job file was edited incorrectly. Lines are matched to options by label, and labels must match exactly what pipeliner --default_runjob generates (e.g. Raw input files: not Input files:). A line whose label doesn't match is silently ignored; no error is raised, and a no value for ... using default value warning is logged for the option.

Fix: Regenerate the template with pipeliner --default_runjob <jobtype> and re-apply your edits, copying labels exactly as they appear.


ValueError: File <name> is not a valid STAR file from edit_jobstar

Symptom: Calling edit_jobstar(fn_template, ...) raises this error.

Cause: A run.job file (which uses label == value format) was passed instead of a STAR-format job.star file.

Fix: Use write_default_jobstar(jobtype) to generate a STAR template, then pass that to edit_jobstar. Use write_default_runjob(jobtype) only for CLI --run_job workflows.


ValueError: Parameter <name> is not found in jobtype <type>

Symptom: proj.run_job(params_dict) raises this error.

Cause: The dictionary contains a key that does not match any registered option for that job type.

Fix: Call job_default_parameters_dict(jobtype) to inspect valid keys. Common mistakes include using human-readable label text instead of the option key (e.g. using "voltage" instead of "kV" for relion.import.movies).


Job type listed as Unavailable in pipeliner.check_setup

Symptom: pipeliner.check_setup shows a job type as Unavailable with a message like '<command>' missing from system path.

Cause: The external executable required by that job is not on the system PATH.

Fix: Install the missing program and ensure it is on PATH, or add its directory to PIPELINER_ADDITIONAL_PROGRAM_PATHS. Note that PIPELINER_ADDITIONAL_PROGRAM_PATHS takes effect at pipeliner import time; restart your Python process after setting it.


pipeliner.recover_project exits with 'No pipeline file found'

Symptom: The recovery script exits immediately without restoring anything.

Cause: default_pipeline.star is completely missing from the project directory. recover_project requires the file to already exist and restores it from per-job backups found in job directories; it cannot create it from scratch.

Fix: Manually copy the most recent default_pipeline.star backup from inside a job directory (e.g. Import/job001/default_pipeline.star) back to the project root, then re-run pipeliner.recover_project.


PipelinerProject.run_cleanup() logs 'Could not find job' and returns False

Symptom: Calling proj.run_cleanup(["job002"]) does nothing.

Cause: run_cleanup requires full job names (e.g. "MotionCorr/job002/"). Short forms like "job002" or "2" are not resolved by this method.

Fix: Resolve the short name first:

full_name = proj.parse_procname("job002")
proj.run_cleanup([full_name])

RuntimeError when opening a RELION 3 pipeline in read-only mode

Symptom: Opening a RELION 3 project raises RuntimeError: Error reading pipeline file …

Cause: RELION 3 pipeline files require in-place conversion, which is only possible when the pipeline is opened for writing. Opening read-only with an unconverted RELION 3 file is not supported. (Instantiating PipelinerProject() on its own does not open the pipeline for writing.)

Fix: Convert the file explicitly with pipeliner --convert_pipeline_file default_pipeline.star (the original is kept as default_pipeline.star.old), or run any command that opens the project for writing, such as pipeliner --run_job.