Learn R Programming

bsub (version 2.0.6)

job_dependency_all: Job dependencies

Description

Job dependencies

Usage

job_dependency_all(job_tb = NULL)

job_dependency_igraph(job_id, job_tb = NULL)

job_dependency_dot(job_id, job_tb = NULL, use_label = FALSE, label_width = 15)

job_dependency_diagram( job_id, job_tb = NULL, use_label = FALSE, label_width = 15, ... )

Value

job_dependency_all() returns a list that contains three elements:

  • dep_mat: a two column matrix containing dependencies from parents to children.

  • id2name: a named vector containing mapping from job IDs to job names.

  • id2stat: a named vector containing mapping from job IDs to job status.

job_dependency_igraph() returns a igraph::igraph object which contains a dependency graph induced by the input job ID.

job_dependency_dot() returns a DOT code for GraphViz visualization.

job_dependency_diagram() makes a HTML-based dependency diagram.

Arguments

job_tb

A data frame from bjobs(). Internally used.

job_id

A single job ID.

use_label

Whether to use job names on the diagram?

label_width

Max number of characters for wrapping the label into lines.

...

Pass to DiagrammeR::grViz(), such as the size of the html widget.

Examples

Run this code
if (FALSE) {
job1 = random_job()
job2 = random_job()
job3 = random_job(dependency = c(job1, job2))

job_dependency_all()
job_dependency_igraph(job3)
cat(job_dependency_dot(job3))
job_dependency_diagram(job3)
}

Run the code above in your browser using DataLab