-
Notifications
You must be signed in to change notification settings - Fork 0
/
workflow.sh
executable file
·41 lines (34 loc) · 1004 Bytes
/
workflow.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
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
samples=$1
command=$2
PROJDIR=$PWD
while read line
do
if [[ ! $line =~ "SampleID" ]] && [[ ! $line =~ "#" ]]
then
### sample details
sampleId=`echo $line | cut -d, -f1`
collectionPathUri=`echo $line | cut -d, -f5`
### preview run info
echo ""
echo "sampleId=$sampleId"
echo "collectionPathUri=$collectionPathUri"
### output directory
rundir=`printf "%s/samples/%05i" $PROJDIR $sampleId`
mkdir -p "$rundir"
# ### run GGA script
# qsub \
# -v root="$PROJDIR",rundir="$rundir",inserts="$PROJDIR/references/inserts.fasta",collectionPathUri="$collectionPathUri" \
# -N "gga$sampleId" \
# -o "$rundir"/workflow.log \
# -j yes \
# "$PROJDIR"/scripts/workflow-gga.sh
### run GGA script
qsub \
-v root="$PROJDIR",rundir="$rundir",inserts="$PROJDIR/references/inserts.fasta",collectionPathUri="$collectionPathUri" \
-N "gga$sampleId" \
-o /dev/null \
-j yes \
"$PROJDIR"/scripts/workflow-gga.sh
fi
done < $samples