forked from albertwcheng/RNASeqMappingScripts3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tophatMap.sh
56 lines (39 loc) · 1.44 KB
/
tophatMap.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
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
source fileUtils.sh
source ./initvars.sh
source $tophatshvar
if [ ! -e $tophatOutputDir ];then
mkdir $tophatOutputDir
fi
#requestEmptyDirWithWarning $tophatOutputDir
saveIFS=$IFS
IFS=`echo -en ","`
declare -a samples=($Samples)
IFS=$saveIFS
###nodenum=1
for sample in ${samples[*]}; do
echo "initiate tophat for sample $sample"
vname=${sample}_1
lfilelist=${!vname}
#lfilelist=`echo $lfilelist | tr "," "|"`
vname=${sample}_2
rfilelist=${!vname}
#rfilelist=`echo $rfilelist | tr "," "|"`
echo left file list $lfilelist
echo right file list $rfilelist
###nodehostname="episode-0$nodenum"
#qsubcommand="qsub -v SAMPLENAME=$sample,LFILELIST=\"$lfilelist\",RFILELIST=\"$rfilelist\",SCRIPTDIR=$scriptDir -q $jobQueue -e $queueJobStdWritePath/$sample.tophatqueue.err -m a -M $queueJobEmail -o $queueJobStdWritePath/$sample.tophatqueue.out $scriptDir/tophatMapJob.sh" ###-l nodes=$nodehostname
#echo $qsubcommand
#eval $qsubcommand
mkdir $tophatOutputDir/${sample}
bsubcommand="bash $scriptDir/tophatMapJobArgList.sh ${sample} $lfilelist $rfilelist $scriptDir"
echo "#!/bin/bash" > $tophatOutputDir/${sample}/bsub.command.sh
echo $bsubcommand >> $tophatOutputDir/${sample}/bsub.command.sh
#echo submitting job to $queue_name
bsub bash $tophatOutputDir/${sample}/bsub.command.sh #-q $jobQueue
###nodenum=`expr $nodenum + 1`
#declare -a filelist=(${!vname})
#for fil in ${filelist[*]}; do
# echo "file $fil"
#done
done