-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtodoMISOStepThreeDetectDifferential.sh
executable file
·77 lines (49 loc) · 1.79 KB
/
todoMISOStepThreeDetectDifferential.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
if [ $# -ne 2 ]; then
echo $0 MISOSettingFile "mode[normal|reduced]"
exit
fi
MISOSettingFile=$1
mode=$2
source ${MISOSettingFile}
misoRunSetting=`abspath.py $misoRunSetting`
echo using miso run setting file $misoRunSetting
thisScriptDir=`pwd`
cd ..
rootDir=`pwd`
#cd $MISOPATH
tophatOutputDir=$rootDir/$bamFileSubRoot
if [[ $mode == "normal" ]]; then
echo differential using the normal MISO mode
MISOOutputDir=$rootDir/${MISOOutSubRoot}/MISOOutput
MISOSummaryDir=$rootDir/${MISOOutSubRoot}/MISOSummary
MISOComparisonsDir=$rootDir/${MISOOutSubRoot}/MISOComparisons
elif [[ $mode == "reduced" ]]; then
echo differential using the MISO full-transcript reduced to Splidar mode
MISOOutputDir=$rootDir/${MISOOutSubRoot}/MISOOutput.reduced
MISOSummaryDir=$rootDir/${MISOOutSubRoot}/MISOSummary.reduced
MISOComparisonsDir=$rootDir/${MISOOutSubRoot}/MISOComparisons.reduced
else
echo unknown summary mode $mode
bash $0
exit
fi
mkdir $MISOComparisonsDir
# differential, all pairwise, all directions
for sampleDirx in $tophatOutputDir/*; do
sampleNamex=`basename $sampleDirx`
for sampleDiry in $tophatOutputDir/*; do
sampleNamey=`basename $sampleDiry`
if [[ $sampleNamex == $sampleNamey ]]; then
continue
fi
echo "trying to compare sample $sampleNamex and $sampleNamey"
misoOutputDirPerSamplex=$MISOOutputDir/$sampleNamex
misoOutputDirPerSampley=$MISOOutputDir/$sampleNamey
misoComparisonsDirPerPairs=$MISOComparisonsDir/${sampleNamex}-${sampleNamey}
mkdir $misoComparisonsDirPerPairs
rm -f $misoComparisonsDirPerPairs/compare_samples.std*
echo "run_miso.py --compare-samples $misoOutputDirPerSamplex $misoOutputDirPerSampley $misoComparisonsDirPerPairs > $misoComparisonsDirPerPairs/compare_samples.stdout 2> $misoComparisonsDirPerPairs/compare_samples.stderr" | bsub
done
done
#COMMENT