phenotypic.sdk_.slurm.parse_job_id#
- phenotypic.sdk_.slurm.parse_job_id(sbatch_stdout: str) str[source]#
Extract the SLURM job ID from sbatch output.
- Parameters:
sbatch_stdout (str) – Standard output from an
sbatchcommand, typically"Submitted batch job 12345\n".- Returns:
The job ID as a string.
- Raises:
RuntimeError – If the job ID cannot be parsed from the output.
- Return type:
Examples
>>> parse_job_id("Submitted batch job 12345\n") '12345'