phenotypic.sdk_.slurm.submit_script#

phenotypic.sdk_.slurm.submit_script(script_path: Path, dependency_job_id: str | None = None, array_index: int | None = None) str[source]#

Submit a script to SLURM via sbatch and return the job ID.

Parameters:
  • script_path (Path) – Path to the SLURM batch script.

  • dependency_job_id (str | None) – When set, adds --dependency=afterany:<id> so this job starts only after the dependency finishes.

  • array_index (int | None) – When set, overrides any script array directive and submits only this array index.

Returns:

SLURM job ID string.

Raises:

RuntimeError – If sbatch is not available, the submission fails, or the job ID cannot be parsed.

Return type:

str