run_Rcodes: 'Run array job of R codes'

Description Usage Arguments Value Examples

View source: R/run_Rcodes.R

Description

Run array job of R codes

Usage

1
2
3
run_Rcodes(inputdf, outdir, cmdno = 100, rcodes = "lib/C_format.R",
  arrayshid = "slurm-script/run_bcf_query_array.sh", email = NULL,
  runinfo = c(FALSE, "bigmemh", 1))

Arguments

inputdf

An input data.frame, with columns of file and out.

outdir

The dir of shell files.

cmdno

Number of commands to excute in each array.

rcodes

The abosulte path of your R codes to run.

arrayshid

The sbatch id.

email

Your email address that farm will email to once the jobs were done/failed.

runinfo

Parameters specify the array job partition information. A vector of c(FALSE, "bigmemh", "1"): 1) run or not, default=FALSE 2) -p partition name, default=bigmemh and 3) –cpus, default=1. It will pass to set_array_job.

cmdno

Number of commands per CPU, i.e. number of rows per inputdf.

Value

return a batch of shell scripts.

Examples

1
2
3
run_Rcodes(inputdf=data.frame(file=1:11, out=10), outdir="slurm-script", cmdno=10,
           rcodes = "lib/C_format.R", arrayshid = "slurm-script/run_rcode_array.sh",
           email=NULL, runinfo = c(FALSE, "bigmemh", 1))

yangjl/farmeR documentation built on May 4, 2019, 2:28 p.m.