-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path03_matchWrapper.R
More file actions
26 lines (22 loc) · 807 Bytes
/
03_matchWrapper.R
File metadata and controls
26 lines (22 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Build sh script for 03_matchRelations.R to submit jobs to queue
library(dplyr)
args<-commandArgs(TRUE)
targets <- as.character(args[1])
threshold <- as.character(args[2])
p.vals <- as.character(args[3])
pstat <- as.character(args[4])
nrows <- as.character(args[5])
date.1 <- as.character(args[6]) #YYYYMMDD
date<-gsub("-","", Sys.Date())
filename<-paste("~/sh/",date,"_",threshold,"_",p.vals,"_ALL", ".sh", sep="")
l<-paste("\n#$ -N ","Par_", p.vals,"_",threshold,"_",nrows,"_", date,sep="")
endL<-paste("\nRscript ~/scripts/03_matchRelations.R",targets,threshold,p.vals, pstat, nrows, date.1)
cat("#!/bin/sh
# Grid Engine options",l,
"\n#$ -cwd
#$ -S /bin/bash
#$ -V
module load sge
module load R/3.5.0\n",
as.character(endL), file=filename, append=FALSE)
system(paste("qsub", filename))