in progress...
[jalview.git] / forester / sh / x_mafft.sh
1 re="(.+)_ni\.fasta$"
2 #re="(.+)\.fasta$"
3 cutoff=3
4 for i in * 
5 do
6     if test -f "$i" 
7     then
8         if [[ $i =~ $re ]]
9         then
10             name=${BASH_REMATCH[1]}
11             echo $name
12             count=$(grep -c '>' $i)
13             echo $count
14             if [ $count -gt $cutoff ]
15             then
16                 /usr/local/bin/mafft --maxiterate 1000 --localpair $i > ${name}_mafft_1000_l.fasta
17                 rc=$?
18                 if [[ $rc != 0 ]]
19                 then
20                     exit $rc
21                 fi
22             fi
23         fi
24     fi
25 done