use_sbatch_template: Use a Sbatch Template to Submit a Job to the Cluster

View source: R/velocity_analysis_functions.R

use_sbatch_templateR Documentation

Use a Sbatch Template to Submit a Job to the Cluster

Description

Use a Sbatch Template to Submit a Job to the Cluster

Usage

use_sbatch_template(
  replace_tibble,
  template,
  file_dir = tempdir(),
  temp_ext = ".sh",
  temp_prefix = "sbatch_",
  warning_label = "",
  submit = TRUE
)

Arguments

replace_tibble

A tibble with two columns, find and replace. The find column should contain the placeholder text to be replaced and the replace column should contain the text to replace it with.

template

The name of the template file to use. This should be a file in the rrrSingleCellUtils/inst folder.

file_dir

The directory to write the temporary sbatch file to.

temp_ext

The extension to use for the temporary sbatch file.

temp_prefix

The prefix to use for the temporary sbatch file.

warning_label

A string to use in the warning message if the sbatch submission fails.

submit

Whether to actually submit the sbatch job or just write the sbatch file. If FALSE, the sbatch file will be written but not submitted.

Value

0 if the sbatch submission was successful, otherwise an error is thrown


kidcancerlab/rrrSingleCellUtils documentation built on April 17, 2025, 5:10 p.m.