Submitter and Monitor of the LSF Cluster
It sends R code/R scripts/shell commands to LSF cluster without leaving R.
Install
if (!requireNamespace("devtools", quietly = TRUE))
install.packages("devtools")
devtools::install_github("jokergoo/bsub")If you want the full functionality of the package, you need to install a few more packages:
devtools::install_github('jokergoo/bsub', dependencies = 'Suggests')Documentation
The online documentation is available at https://jokergoo.github.io/bsub/.
There are four vignettes:
- Send R code/R scripts/shell commands to LSF cluster
- Configure bsub package for other LSF institutes
- What if you need to establish two ssh connections to reach the submission node
Submit jobs
Directly submit R chunk:
library(bsub)
# R code
bsub_chunk(name = "example", memory = 10, hour = 10, core = 4,
{
fit = NMF::nmf(...)
# you better save `fit` into a permanent file
saveRDS(fit, file = "/path/of/fit.rds")
})Submit an R script:
# R script
bsub_script(name = "example",
script = "/path/of/foo.R", ...)Submit shell commands:
# shell commands
bsub_cmd(name = "example",
cmd = "samtools view ...", ...)Kill jobs:
bkill(job_id)View job info
View job summaries:
bjobs
brecent
bjobs_running
bjobs_pending
bjobs_done
bjobs_exitAn example of the job queries is as follows:
View job log:
job_log(job_id)Interactive job monitor
monitor()The job summary table:
Job log:
Job dependency tree:
Kill jobs:
License
MIT @ Zuguang Gu




