parse_task_ids: Parse array task IDs

View source: R/parse_task_ids.R

parse_task_idsR Documentation

Parse array task IDs

Description

This function takes either a character vector or a numeric one as input. It can be used with the list of jobs that failed from qstat (like those in Eqw status) to find which tasks IDs need to be re-submitted for a given array job.

Usage

parse_task_ids(task_ids)

parse_task_ids_builder(task_ids_char)

Arguments

task_ids

Either a character vector taken from the qstat output or with a numeric input.

task_ids_char

A character vector of task IDs that is not SGE-ready yet.

Value

A character vector with SGE-ready task ids to submit using array_submit.

Author(s)

Leonardo Collado-Torres

Examples


## This is an example true output from "qstat | grep Eqw"
## 7770638 0.50105 compute_we lcollado     Eqw   08/16/2019 14:57:25                                    1 225001-225007:1,225009-225017:2,225019-225038:1,225040,225043,225047,225049
## parse_task_ids() can then take as input the list of task ids that failed
parse_task_ids("225001-225007:1,225009-225017:2,225019-225038:1,225040,225043,225047,225049")

## Or it could be split across two, though the result will be identical
parse_task_ids(c("225001-225007:1,225009-225017:2", "225019-225038:1,225040,225043,225047,225049"))

## While this works
parse_task_ids(1:10)

## it's better for SGE if you specify the range
parse_task_ids("1-10")


## Adds the dash (-) to specify a start and end for the array job
## for those elements that are missing it
parse_task_ids_builder(c("1", "2-10:2"))

LieberInstitute/sgejobs documentation built on May 12, 2023, 5:20 p.m.