bsub_chunk | R Documentation |
Submit jobs
bsub_chunk(
code,
name = NULL,
packages = bsub_opt$packages,
image = bsub_opt$image,
variables = character(),
share = character(),
working_dir = bsub_opt$working_dir,
hours = 1,
memory = 1,
cores = 1,
R_version = bsub_opt$R_version,
temp_dir = bsub_opt$temp_dir,
output_dir = bsub_opt$output_dir,
dependency = NULL,
enforce = bsub_opt$enforce,
local = bsub_opt$local,
script = NULL,
start = NULL,
end = NULL,
save_var = FALSE,
sh_head = bsub_opt$sh_head,
ask = TRUE
)
bsub_script(
script,
argv = "",
name = NULL,
hours = 1,
memory = 1,
cores = 1,
R_version = bsub_opt$R_version,
temp_dir = bsub_opt$temp_dir,
output_dir = bsub_opt$output_dir,
dependency = NULL,
enforce = bsub_opt$enforce,
local = bsub_opt$local,
sh_head = bsub_opt$sh_head,
ask = TRUE,
...
)
bsub_cmd(
cmd,
sh = NULL,
name = NULL,
hours = 1,
memory = 1,
cores = 1,
temp_dir = bsub_opt$temp_dir,
output_dir = bsub_opt$output_dir,
dependency = NULL,
enforce = bsub_opt$enforce,
local = bsub_opt$local,
env_var = NULL,
sh_head = bsub_opt$sh_head,
ask = TRUE,
...
)
code |
The code chunk, it should be embraced by |
name |
If name is not specified, an internal name calculated by |
packages |
A character vector with package names that will be loaded before running the script. There is a special name |
image |
A character vector of |
variables |
A character vector of variable names that will be loaded before running the script. There is a special name |
share |
A character vector of variables names for which the variables are shared between jobs. Note the temporary |
working_dir |
The working directory. |
hours |
Running time of the job. |
memory |
Memory usage of the job. It is measured in GB. |
cores |
Number of cores. |
R_version |
R version. |
temp_dir |
Path of temporary folder where the temporary R/bash scripts will be put. |
output_dir |
Path of output folder where the output/flag files will be put. |
dependency |
A vector of job IDs that current job depends on. |
enforce |
If a flag file for the job is found, whether to enforce to rerun the job. |
local |
Run job locally (not submitting to the LSF cluster)? |
script |
In |
start |
A numeric vector that contains line indices of the starting code chunk or a character vector that contain regular expression to match the start of code chunks. |
end |
Same setting as |
save_var |
Whether save the last variable in the code chunk? Later the variable
can be retrieved by |
sh_head |
Commands that are written as head of the sh script. |
ask |
Whether to promote. |
argv |
A string of command-line arguments. |
... |
Command-line arguments can also be specified as name-value pairs. |
cmd |
A single-line command. |
sh |
Path of the bash script. |
env_var |
Environment variables. It should be a named vector. Note environment variables can also be directly set in |
job_chunk()
submits R code chunk.
job_script()
submits R script with command-line arguments.
job_cmd()
submits general bash commands.
A job ID.
## Not run:
bsub_chunk(name = "example", memory = 10, hours = 10, cores = 4,
{
Sys.sleep(5)
})
# the R version is defined in bsub_opt$R_version
bsub_script("/path/of/foo.R", name = ..., memory = ..., cores = ..., ...)
# with command-line arguments
bsub_script("/path/of/foo.R", argv = "--a 1 --b 3", ...)
# put all arguments also in the command
bsub_cmd("some-tool -arg1 1 -arg2 2", name = ..., memory = ..., cores = ..., ...)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.