forked from keylabivdc/VIP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TaxI.sh
49 lines (44 loc) · 1.27 KB
/
TaxI.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
#!/bin/bash
#
#
# TaxI.sh
#
# Quick guide:
# The scientific information will be appending at the end of each record.
#
# TaxI.sh <nucl_file/prot_file> <sam/blast> <nucl/prot> <cores> <tax_dir>
#
### Authors : Yang Li <[email protected]>
### License : GPL 3 <http://www.gnu.org/licenses/gpl.html>
### Update : 2015-07-05
#
scriptname=${0##*/}
if [ $# -lt 5 ]
then
echo "Usage: $scriptname <nucl_file/prot_file> <sam/blast> <nucl/prot> <cores> <tax_dir>"
exit 65
fi
########
result=$1
filetype=$2
datatype=$3
total_cores=$4
tax_dir=$5
########
if [ "$filetype" = "blast" ]
then
sed -i '/^#/d' $result
echo -e "$(date)\tParsing $result"
echo -e "$(date)\tThe filetype of $result is $filetype"
echo -e "perl taxonomy_lookup.pl $result blast prot $total_cores $tax_dir"
#perl taxonomy_lookup.pl $result blast prot $total_cores $tax_dir
taxonomy_lookup.pl $result blast prot $total_cores $tax_dir
table_generator.sh $result.all.annotated blast
else
echo -e "$(date)\tParsing $result"
echo -e "$(date)\tThe filetype of $result is $filetype"
echo -e "perl taxonomy_lookup.pl $result sam nucl $total_cores $tax_dir"
#perl taxonomy_lookup.pl $result sam nucl $total_cores $tax_dir
taxonomy_lookup.pl $result sam nucl $total_cores $tax_dir
table_generator.sh $result.all.annotated sam
fi