Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jokergoo/bsub
Send R code/R scripts/shell commands to LSF cluster without leaving R
https://github.com/jokergoo/bsub
Last synced: 24 days ago
JSON representation
Send R code/R scripts/shell commands to LSF cluster without leaving R
- Host: GitHub
- URL: https://github.com/jokergoo/bsub
- Owner: jokergoo
- License: other
- Created: 2019-11-07T22:40:28.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-30T07:08:15.000Z (7 months ago)
- Last Synced: 2024-05-09T07:44:53.714Z (6 months ago)
- Language: R
- Homepage: https://jokergoo.github.io/bsub
- Size: 1.45 MB
- Stars: 23
- Watchers: 3
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Submitter and Monitor of the LSF Cluster
[![R-CMD-check](https://github.com/jokergoo/bsub/workflows/R-CMD-check/badge.svg)](https://github.com/jokergoo/bsub/actions)
[![CRAN](https://www.r-pkg.org/badges/version/bsub)](https://cran.r-project.org/web/packages/bsub/index.html)It sends R code/R scripts/shell commands to LSF cluster without leaving R.
### Install
Directly from CRAN:
```r
install.packages("bsub")
```Or from GitHub:
```r
if (!requireNamespace("devtools", quietly = TRUE))
install.packages("devtools")
devtools::install_github("jokergoo/bsub")
```### Documentation
The online documentation is available at https://jokergoo.github.io/bsub/.
### Submit jobs
Directly submit R chunk:
```r
library(bsub)# R code
bsub_chunk(name = "example", memory = 10, hours = 10, cores = 4,
{
fit = NMF::nmf(...)
# you better save `fit` into a permanent file
saveRDS(fit, file = "/path/of/fit.rds")
})
```Submit an R script:
```r
# R script
bsub_script(name = "example",
script = "/path/of/foo.R", ...)
```Submit shell commands:
```r
# shell commands
bsub_cmd(name = "example",
cmd = "samtools view ...", ...)
```Kill jobs:
```r
bkill(job_id)
```### Job dependencies
```r
job1 = bsub_chunk(...)
job2 = bsub_chunk(...)
bsub_chunk(..., dependency = c(job1, job2))
```### View job info
View job summaries:
```r
bjobs
brecent
bjobs_running
bjobs_pending
bjobs_done
bjobs_exit
```An example of the job queries is as follows:
![](https://user-images.githubusercontent.com/449218/71292253-2577ad00-2374-11ea-9402-855e7f01652c.png)
View job log:
```r
job_log(job_id)
```### Interactive job monitor
```r
monitor()
```The job summary table:
Job log:
Job dependency diagram:
### License
MIT @ Zuguang Gu