run_Rcode: 'Run array job of R codes'

Description Usage Arguments Value Examples

View source: R/run_Rcode.R

Description

Run array rcodes according to the parameters in the inputdf file. The array job number = nrow(inputdf).

Usage

1
2
3
run_Rcode(inputdf, outdir, cmdno = 1, rcodes = "lib/C_format.R",
  rversion = "3.5", base_shid = "run_bcf_query", email = NULL,
  runinfo = c(FALSE, "bigmemh", 5, "5G", "16:00:00", 1))

Arguments

inputdf

An input data.frame, with columns of file and out. [df, cols=file, out] Note, row parameter "j" will be passed to each array job!

outdir

The dir of shell files. [chr, "largedata/"]

cmdno

Number of commands to excute in each array. [num, =1]

rcodes

The abosulte path of your R codes to run. [chr, ="lib/C_format.R"]

rversion

R version used. [chr, ="3.5"]

base_shid

The base of the sbatch id. [chr, ="slurm-script/run_bcf_query"]

email

Your email address that farm will email to once the jobs were done/failed. [chr, =NULL]

runinfo

[vector, runinfo = c(FALSE, "bigmemh", 5, "5G", "16:00:00")]

Value

return a batch of shell scripts.

Examples

1
2
3
4
sh <- paste0('R --no-save --args ', j, ' < ', rcodes)
run_Rcode(inputdf=data.frame(file=1:11, out=10), outdir="slurm-script", cmdno=10,
           rcodes = "lib/C_format.R", arrayshid = "run_rcode",
           email=NULL, runinfo = c(FALSE, "bigmemh", 1))

yangjl/huskeR documentation built on Sept. 2, 2021, 5:38 a.m.