-
Notifications
You must be signed in to change notification settings - Fork 1
/
todoRPKM.sh
executable file
·44 lines (27 loc) · 880 Bytes
/
todoRPKM.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
#!/bin/bash
if [ $# -lt 1 ]; then
echo $0 MISOSettingFile
exit
fi
MISOSettingFile=$1
source ${MISOSettingFile}
thisScriptDir=`pwd`
cd ..
rootDir=`pwd`
cd $MISOPATH
tophatOutputDir=$rootDir/$bamFileSubRoot
MISOOutputDir=$rootDir/${MISOOutSubRoot}/MISO_RPKM
#mkdir $MISOSummaryDir
mkdir $rootDir/${MISOOutSubRoot}
mkdir $MISOOutputDir
for sampleDir in $tophatOutputDir/*; do
sampleName=`basename $sampleDir`
if [ ! -e $sampleDir/${targetBamFileBaseName} ]; then
continue
fi
mkdir $MISOOutputDir/$sampleName
#pwd
command="python sam_rpkm.py --compute-rpkm ${rawGffFile} $sampleDir/${targetBamFileBaseName} $MISOOutputDir/$sampleName --read-len $readLen > $MISOOutputDir/$sampleName/$sampleName.rpkm.stdout 2> $MISOOutputDir/$sampleName/$sampleName.rpkm.stderr"
echo $command > $MISOOutputDir/$sampleName/qsub.sh
bsub bash $MISOOutputDir/$sampleName/qsub.sh
done