File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash --noprofile
2
2
THIS=$( dirname $0 )
3
3
source $THIS /../../bash_common.sh
4
- if [ $# -ne 2 ]; then
4
+ if [ $# -ne 3 ]; then
5
5
echo " Print: <Genome.id> <univs>"
6
6
echo " Input: hmm-univ.list"
7
7
echo " #1: Genome.id"
8
8
echo " #2: large (0/1)"
9
+ echo " #3: suffix: HMM|tblastn"
9
10
exit 1
10
11
fi
11
12
G=$1
12
13
LARGE=$2
14
+ SUF=$3
15
+
16
+
17
+ sort -cu hmm-univ.list
13
18
14
19
15
20
H=" "
16
21
if [ $LARGE -eq 1 ]; then
17
22
H=$( $THIS /../../file2hash $G )
18
23
fi
19
24
20
- $THIS /../../check_file.sh genome/$H /$G /$G .prot-univ 1
25
+ F=genome/$H /$G /$G .prot-univ.$SUF
26
+ if [ ! -e $F ]; then
27
+ exit 0
28
+ fi
21
29
22
30
23
31
TMP=$( mktemp )
24
32
25
33
26
- grep ' ^>' genome/ $H / $G / $G .prot-univ | sed ' s/^>//1' | sed ' s/ .*$//1' | sort -u > $TMP || true
34
+ grep ' ^>' $F | sed ' s/^>//1' | sed ' s/ .*$//1' | sort -u > $TMP || true
27
35
N=$( join -1 1 -2 1 $TMP hmm-univ.list | wc -l )
28
36
echo " $G $N "
29
37
You can’t perform that action at this time.
0 commit comments