Command Line Tools

The pipeliner command allows pipeliner functions to be run from the command line.

CCPEM Pipeliner command line utility

usage: pipeliner [-h] [--new_project [project name]]
                 [--available_jobs [search string]]
                 [--check_jobs [search string]]
                 [--run_job [run.job or job.star file]]
                 [--overwrite [job name]] [--continue_job [job name]]
                 [--abort_job [job name]]
                 [--print_command [run.job or job.star file]]
                 [--schedule_job [run.job, job.star file or job name]]
                 [--run_schedule] [--name [NAME]] [--jobs [job name ...]]
                 [--min_between [n]] [--nr_repeats [1]] [--wait_sec_after [2]]
                 [--wait_min_before [0]] [--stop_schedule [STOP_SCHEDULE]]
                 [--delete_job [job name]] [--undelete_job [job name]]
                 [--set_alias [job name] [new alias]]
                 [--clear_alias [job name]] [--set_status [job name]
                 {finished, failed, aborted}] [--cleanup [job name ...]]
                 [--harsh] [--restore_cleaned_files [job name]]
                 [--validate_starfile [star file]]
                 [--convert_pipeline_file [_pipeline.star file]]
                 [--default_jobstar [job type]] [--relionstyle]
                 [--default_runjob [job type]] [--job_info [job type]]
                 [--empty_trash] [--job_references [job type]]
                 [--references_report [job name]]
                 [--metadata_report [terminal job]]
                 [--full_archive [terminal job name]]
                 [--simple_archive [terminal job name]]
                 [--empiar_deposition [terminal job name]]
                 [--onedep_deposition]
                 [--deposition_id [Deposition id (Assigned by the database)]]
                 [--primary_map PRIMARY_MAP] [--model MODEL]
                 [--additional_maps [ADDITIONAL_MAPS ...]]
                 [--masks [MASKS ...]] [--halfmaps HALFMAPS HALFMAPS]
                 [--sequences [SEQUENCES ...]]
                 [--empiar_jobstar_file [Template file to update]]
                 [--empiar_movies] [--empiar_mics] [--empiar_parts]
                 [--empiar_corr_parts]

Arguments

--new_project

Initialize a new project in this directory. Project name is optional, if none is specified the project will be called ‘default’ (recommended)

--available_jobs

Show a list of all available jobs, optionally add a search string to limit the search, Leave blank to show all available job types

--check_jobs

Get a list of available and unavailable jobs with detailed info onthe programs they use and why they are unavailable (if applicable)

Running jobs

--run_job

Create a job using a run.job or job.star file to get the parameters

--overwrite

Use with –run_job to overwrite a current job rather than making a new job. Jobs can only be overwritten with the same job type

--continue_job

Continue a job that has been previously run. Edit the job’s continue_job.star file to modify parameters for the continuation

--abort_job

Abort a running job

--print_command

Read a job.star or run.job file and print the command(s) it would produce

--schedule_job

Add a job to list of scheduled jobs using a run.job or job.star file to get the parameters. If followed by a job.star file it will create a new job if followed by a job name it will schedule a continuation of that job

Executing Schedules

--run_schedule

Create a schedule choosing from the currently scheduled jobs and run it

Default: False

--name

(required) Enter a name for the new schedule

--jobs

(required) Enter the jobs that will be run. Make sure to list the jobs in the order which they should be run

--min_between

(optional) Wait at least this many minutes between jobs

Default: 0

--nr_repeats

(optional) Repeat the schedule this many times

Default: 1

--wait_sec_after

(optional) Wait this many seconds after finishing before starting the next job

Default: 2

--wait_min_before

(optional) Wait this many minutes before starting the schedule

Default: 0

--stop_schedule

(required) Enter a name for the schedule to be stopped

Deleting jobs

--delete_job

Remove job(s) and put in the trash, deletes the job and all of its child processes

Undeleting jobs

--undelete_job

Restore a deleted job and any of its deleted parent processes from the trash

Modifying jobs

--set_alias

Set the alias of a job

--clear_alias

Clear the alias of a job

--set_status

Set the status of a job; choose from ‘finished, failed, or aborted

Cleaning Up Job(s)

--cleanup

Delete intermediate files from these job(s) to save disk space; enter ALL to clean up all jobs

--harsh

Add this argument to –cleanup to delete even more files

Default: False

--restore_cleaned_files

Restore files that have been moved to Trash by cleanup back to their original jobs. Specify the jobs to restore or run alone to restore allcleaned files

Utilities

--validate_starfile

Check a STAR file and make sure it is written in the correct format. If errors are found will attempt to fix them

--convert_pipeline_file

Convert a pipeline file from Relion 3.1 to the CCPEM pipeliner format

--default_jobstar

Make a job.star file with the default values for a specific job type for use with the ccpem-pipeliner

--relionstyle

OPTIONAL: Add this argument to –default_jobstar to write job.star files which are compatible with RELION 4.0. RELIONstyle job.star files are fully compatible with the pipeliner, pipeliner job.star files may havedifferences that cause bugs in RELION

Default: False

--default_runjob

Make a _run.job file with the default values for a specific job type. These files can also be used to run jobs and a more human readable

--job_info

Get info about a specific job type, including any reference(s)

--empty_trash

Delete the files in the trash. THIS CANNOT BE UNDONE!

Default: False

--job_references

Get literature reference(s) for a specific job type

--references_report

Get all the literature references for a project with the selected job as the termial job

Project Analysis

--metadata_report

Prepares a report in .json format for the terminal job and allof its parent jobs

Project Archiving

--full_archive

Create a full archive for a project. This will contain the entire job dirs for the stated terminal job and all of its parents

--simple_archive

Create a simple archive for a project. This will contain just the directory structure and parameter files for the stated terminal job andall of it’s parents along with a script to automatically re-run the project through the terminal job

Prepare EMDB/EMPIAR/PDB depositions

--empiar_deposition

Prepare a deposition for upload to the EMPIAR database

--onedep_deposition

Prepare a deposition for upload to the pdb/emdb databases

Default: False

--deposition_id

[Optional] The deposition ID. This must be assigned by EBI. If not specified, a draft deposition will be created

Default: 'deposition'

--primary_map

[Optional] The primary map to be deposited to the pdb/emdb, in mrc format

--model

[Optional] The model to be deposited to the pdb/emdb, in mmcif format

--additional_maps

[Optional] Additional maps to be included in the deposition, in mrc format

--masks

[Optional] Masks to be included in the deposition, in mrc format

--halfmaps

[Optional] The halfmaps for the reconstruction, in mrc format. Twohalfmaps must be provided

--sequences

[Optional] Sequences to be included in the deposition, in fasta format

--empiar_jobstar_file

(optional) A job.star file from a pipeliner.deposition.empiar job. This contains data necessary from the deposition that cannot be automatically found. If not included, the deposition will only contain the data that can be found and will need to be manually completed

--empiar_movies

(optional) Add this argument to deposition to include unprocessed movies in the EMPIAR deposition

Default: False

--empiar_mics

(optional) Add this argument to deposition to include corrected micrographs in the EMPIAR deposition

Default: False

--empiar_parts

(optional) Add this argument to deposition to include particles in the EMPIAR deposition

Default: False

--empiar_corr_parts

(optional) Add this argument to deposition to include corrected (polished) particles in the EMPIAR deposition

Default: False

Additional command line scripts

Pipeliner installs a number of other commands alongside pipeliner. Unless noted otherwise, run these from the top-level directory of a Pipeliner project.

pipeliner.check_setup

Checks the Pipeliner installation. Reports the Python version, which job types are available, and whether the external programs each job needs can be found.

pipeliner.bug_report_data

Gathers information useful for diagnosing a failed job: job files, Pipeliner configuration files, operating system and hardware details, and Python package versions. The data is written to a time stamped directory and a tar.gz archive that can be sent to CCP-EM. Review the contents before sharing, as they may include user paths, host names or job parameters.

  • -j, --job: the job with the error (required)

pipeliner.regenerate_results

Regenerates the results display files for jobs and nodes in the project. With no arguments, results are regenerated for every job and node.

  • --jobs: only regenerate results for these jobs

  • --nodes: only regenerate results for these nodes

  • --node_summary: generate summary objects for nodes instead of the normal results display objects

  • --ignore_errors: carry on if results cannot be generated for a job or node

pipeliner.update_nodes

Makes sure all the nodes expected for each job are present in the pipeline file. This is mainly needed for projects started in RELION and moved to Pipeliner, because Pipeliner expects some nodes that RELION does not produce. Takes no arguments.

pipeliner.recover_project

Attempts to recover a project with a damaged or locked pipeline. It removes a stale .relion_lock directory and restores default_pipeline.star from the most recent job directory containing a backup. Jobs run after that backup will be lost from the restored pipeline.

  • -y, --assume-yes: do not prompt for confirmation before recovering

pipeliner.merge_projects

Merges several Pipeliner projects into a new one. Each old project becomes a subdirectory of the new project. Only STAR files are copied; everything else is symlinked, and paths in the STAR files are updated. A single job in the new project records details of the merge. The subdirectories can be viewed in Doppio but should not be modified, for example by running jobs.

  • --old_projects: the projects to merge (required)

  • --new_project: directory for the merged project (required)

pipeliner.make_project_tutorial

Takes a completed project and writes a tutorial document for running it.

  • -j, --job: the terminal job of the project (required)

pipeliner.bfactor_plot

Runs a B-factor analysis tool replicating the function of the bfactor_plot.py script from Relion 3.0 and 4.1. It repeats refinement and postprocessing on subsets of the particles from a RELION refinement and plots the resulting resolution against particle number.

  • --postprocess_job: the postprocess job to test (required)

  • --start_at_pp: start at the postprocessing step, for when the program stopped while waiting for queued refinement jobs. Assumes all refinements have completed

  • --only_analysis: only run the analysis step, when refinement and postprocessing have already been run

  • --angpix: pixel size for the postprocessing jobs

  • --min_particles: minimum number of particles to calculate a resolution for

pipeliner.setup_onedep_credentials

Creates or updates the OneDep credential configuration file from a refresh token. The token is requested with a hidden prompt (or read from the ONEDEP_REFRESH_TOKEN environment variable) and is never written to a Pipeliner project. See OneDep deposition.

  • --config-path: the credential file to create or update

Developer tools

These are used when maintaining Pipeliner itself and are not normally needed by users.

pipeliner.update_metadata_schema

Creates or updates the JSON metadata schemas for every job type’s parameters and results, and reports any that are out of date.

pipeliner.update_onedep_dict

Downloads the current mmCIF/PDBx dictionary used for OneDep deposition and replaces Pipeliner’s bundled copy if it is out of date.