[R] submitting R scripts with command_line_arguments to PBS HPC clusters

Bogdan Tanasa tanasa at gmail.com
Wed Jul 12 02:25:20 CEST 2017


Dear all,

please could you advise me on the following : I've written a R script that
reads 3 arguments from the command line, i.e. :

" args <- commandArgs(TRUE)
TUMOR <- args[1]
GERMLINE <- args[2]
CHR <- args[3] ".

when I submit the R script to a PBS HPC scheduler, I do the following
(below), but ... I am getting an error message.
(I am not posting the error message, because the R script I wrote works
fine when it is run from a regular terminal ..)

Please may I ask, how do you usually submit the R scripts with command line
arguments to PBS HPC schedulers ?

qsub -d $PWD -l nodes=1:ppn=4 -l vmem=10gb -m bea -M tanasa at gmail.com \
-v TUMOR="tumor.bam",GERMLINE="germline.bam",CHR="chr22" \
-e script.efile.chr22 \
-o script.ofile.chr22 \
script.R

Thank you very very much  !

-- bogdan

	[[alternative HTML version deleted]]



More information about the R-help mailing list