-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubmit.sh
28 lines (23 loc) · 887 Bytes
/
submit.sh
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
27
28
#!/bin/bash
################################################
################################################
# This is a wrapper script to submit single.sh
# this script takes a comma separated file that
# includes sample id, and absolute paths of
# fastq files and submits a job with it's own
# error and log files. The results will be
# specified in the $outdir variable.
# see Readme.md for more info
###############################################
files_file=$1
outdir=$2
submission=$3
mkdir -p $outdir
while read line
do
sample=$(echo $line | cut -d "," -f 1)
fastq1=$(echo $line | cut -d "," -f 2)
fastq2=$(echo $line | cut -d "," -f 3)
echo "$sample is being submitted results will be in $outdir"
qsub -v sample=$sample,outdir=$outdir,fastq1=$fastq1,fastq2=$fastq2 -e $outdir/$sample.err -o $outdir/$sample.out -N $sample single.sh
done < $files_file > $submission