-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathphasiHunter
executable file
·59 lines (53 loc) · 1.9 KB
/
phasiHunter
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
#!/bin/bash
# ----------> declaration variables <------------
tmp=`which phasiHunter`
wd=${tmp%/*}
# ----------> parameter capture start <------------
if [ "$#" -eq 0 ] ; then echo -e "type ${0##*/} -h for help message"
exit 1
fi
if [ $1 = '-h' ]
then
echo "Usage:
phasiHunter subcommand options
subcommand:
run: one command executing mode, config.yaml file required
preprocess: generating map file for phasiRNA cluster prediction
phase: predicting phasiRNA cluster based on multiple reference sequences
integration: integrating phase module output
visulization: for phasiRNA cluster visulization
target: for sRNA target gene prediction
initiator: for phasiRNA initiator prediction
deg: for phasiRNA initiator or phasiRNA target gene verrification based on degradome verrification
type phasiHunter subcommad -h for more subcommad detail"
exit 1
fi
if [ "$#" -gt 0 ]
then
for (( i=1; i<="$#"; i++ )) ; do
case ${!i} in
-v)
echo "phasiHunter version 1.0"
exit 1
;;
esac
done
fi
# ----------> parameter capture end<------------
tmp=(`echo $@`)
parameter=${tmp[@]:1:$#}
[ $1 != 'preprocess' ] || bash $wd/bin/preprocess.sh $parameter
[ $1 != 'phase' ] || python3 $wd/bin/phase.py $parameter
[ $1 != 'integration' ] || python3 $wd/bin/integration.py $parameter
[ $1 != 'visulization' ] || python3 $wd/bin/visualization.py $parameter
[ $1 != 'initiator' ] || python3 $wd/bin/initiator.py $parameter
if [ $1 = 'target' ]; then
if [[ $parameter == *-t* ]]; then
perl $wd/bin/TarHunterL_Modified.pl $parameter
else
perl $wd/bin/TarHunterL_Modified.pl $parameter "-t"
fi
fi
[ $1 != 'deg' ] || python3 $wd/bin/deg.py $parameter
[ $1 != 'read' ] || python3 $wd/bin/readstdin.py $parameter
[ $1 != 'run' ] || python3 $wd/bin/run.py $parameter