gaps.pipeline.parse_previous_status#

parse_previous_status(status_dir, command, key=StatusField.OUT_FILE)[source]#

Parse key from job status(es) from the previous pipeline step.

Parameters:
  • status_dir (path-like) – Directory containing the status file to parse.

  • command (str) – Current CLI command (i.e. current pipeline step).

  • key (StatusField | str, optional) – Parsing target of previous command. By default, StatusField.OUT_FILE.

Returns:

out (list) – Arguments parsed from the status file in status_dir from the command preceding the input command arg. This list is empty if the key is not found in the job status, or if the previous step index does not exist in status.

Raises:

gapsKeyError – If command not in status.

Warning

This command DOES NOT check the HPC queue for jobs and therefore DOES NOT update the status of previously running jobs that have errored out of the HPC queue. For best results, ensure that all previous steps of a pipeline have finished processing before calling this function.

This command will not function properly for pipelines with duplicate command calls (i.e. multiple collect calls under different names, etc.).