This function searches a log file, such as those created with job_single(), for SGE job identifier.

log_jobid(log_file, jobid_header = "Job id:")

Arguments

log_file

The path to a SGE log file.

jobid_header

A character(1) vector with the line header that specifies the SGE ID.

Value

A character(1) vector with the job id (first one found in the log file).

See also

Author

Leonardo Collado-Torres

Examples


## Example log file
bsp2_log <- system.file("extdata", "logs", "delete_bsp2.txt", package = "sgejobs")

## Find the job id
log_jobid(bsp2_log)
#> [1] "92500"

## Another example log file
twas_gene_HIPPO <- system.file("extdata", "logs",
    "compute_weights_full_HIPPO_gene.1.txt",
    package = "sgejobs"
)

## Id for the second example
log_jobid(twas_gene_HIPPO)
#> [1] "7751602"