3 myself=`dirname $0`/`basename $0`; export myself
4 version="version 5.741 (2006/03/02)"; export version
8 if [ `echo $os | grep -i cygwin` ]; then
10 elif [ `echo $os | grep -i darwin` ]; then
12 elif [ `echo $os | grep -i sunos` ]; then
19 if [ "$MAFFT_BINARIES" ]; then
20 prefix="$MAFFT_BINARIES"
25 if [ ! -x "$prefix/tbfast" ]; then
27 echo "correctly installed?" 1>&2
28 echo "mafft binaries have to be installed in" "$prefix". 1>&2
36 defaultmodel=" -b 62 "
41 defaultdistance="sixtuples"
42 if [ $progname = "linsi" ]; then
46 defaultdistance="local"
47 elif [ $progname = "ginsi" ]; then
51 defaultdistance="global"
52 elif [ $progname = "einsi" ]; then
56 defaultdistance="genaf"
57 elif [ $progname = "fftns" ]; then
60 elif [ $progname = "fftnsi" ]; then
64 elif [ $progname = "nwns" ]; then
67 elif [ $progname = "nwnsi" ]; then
76 iterate=$defaultiterate
79 distance=$defaultdistance
100 if [ $# -gt 0 ]; then
103 if [ $1 = "--clustalout" ]; then
104 outputformat="clustal"
105 elif [ $1 = "--reorder" ]; then
107 elif [ $1 = "--rough" ]; then
109 elif [ $1 = "--fastswpair" ]; then
112 elif [ $1 = "--fastapair" ]; then
115 elif [ $1 = "--noscore" ]; then
117 elif [ $1 = "--blastpair" ]; then
119 elif [ $1 = "--globalpair" ]; then
121 elif [ $1 = "--localpair" ]; then
123 elif [ $1 = "--genafpair" ]; then
125 elif [ $1 = "--memsave" ]; then
126 memopt=" -M -B " # -B (bunkatsunashi no riyu ga omoidasenai)
127 elif [ $1 = "--nuc" ]; then
129 elif [ $1 = "--amino" ]; then
131 elif [ $1 = "--fft" ]; then
133 elif [ $1 = "--nofft" ]; then
135 elif [ $1 = "--quiet" ]; then
137 elif [ $1 = "--coreext" ]; then
139 elif [ $1 = "--core" ]; then
141 elif [ $1 = "--maxiterate" ]; then
143 iterate=`expr $1 - 0` || er=1
144 elif [ $1 = "--retree" ]; then
146 cycle=`expr $1 - 0` || er=1
147 elif [ $1 = "--jtt" ]; then
150 elif [ $1 = "--tm" ]; then
153 elif [ $1 = "--bl" ]; then
156 elif [ $1 = "--weighti" ]; then
159 elif [ $1 = "--op" ]; then
162 elif [ $1 = "--ep" ]; then
165 elif [ $1 = "--lop" ]; then
168 elif [ $1 = "--LOP" ]; then
171 elif [ $1 = "--lep" ]; then
174 elif [ $1 = "--lexp" ]; then
177 elif [ $1 = "--LEXP" ]; then
180 elif [ $1 = "--corethr" ]; then
183 elif [ $1 = "--corewin" ]; then
186 elif [ $1 = "--seed" ]; then
189 seedfiles=$seedfiles" "$1
190 elif [ $1 -gt 0 -a $progname = "fftns" -o $1 -gt 0 -a $progname = "nwns" ]; then
193 echo "Unknown option: " $1 1>&2
198 if [ $fft -eq 1 ]; then
203 if [ $sw -eq 1 ]; then
209 if [ $distance = "fasta" ]; then
210 if [ ! $FASTA_4_MAFFT ]; then
211 FASTA_4_MAFFT=`which fasta34`
214 if [ ! -x $FASTA_4_MAFFT ]; then
216 echo "== Install FASTA ========================================================" 1>&2
217 echo "This option requires the fasta34 program (FASTA version x.xx or higher)" 1>&2
218 echo "installed in your PATH. If you have the fasta34 program but have renamed" 1>&2
219 echo "(like /usr/local/bin/myfasta), set the FASTA_4_MAFFT environment variable" 1>&2
220 echo "to point your fasta34 (like setenv FASTA_4_MAFFT /usr/local/bin/myfasta)." 1>&2
221 echo "=========================================================================" 1>&2
226 nseq=`grep -c '^[>|=]' "$1"`
227 if [ $nseq -eq 2 ]; then
230 if [ $cycle -gt 3 ]; then
233 if [ $distance = "sixtuples" -a $seed = "x" ]; then
235 elif [ $distance = "sixtuples" -a $seed != "x" ]; then
237 localparam="-l "$weighti
240 localparam=" -l "$weighti
242 if [ $distance = "genaf" ]; then
246 if [ $distance = "fasta" -a $sw -eq 0 ]; then
248 elif [ $distance = "fasta" -a $sw -eq 1 ]; then
250 elif [ $distance = "blast" ]; then
252 elif [ $distance = "global" ]; then
254 elif [ $distance = "local" ]; then
256 elif [ $distance = "genaf" ]; then
258 elif [ $fft -eq 1 ]; then
263 strategy=$strategy"NS-"
264 if [ $iterate -gt 0 ]; then
265 strategy=$strategy"i"
266 elif [ $rough -eq 1 ]; then
267 strategy=$strategy"ROUGH"
269 strategy=$strategy$cycle
273 performance='Not tested.'
274 if [ $strategy = "F-INS-i" ]; then
275 explanation='Iterative refinement method incorporating LOCAL pairwise alignment information'
276 performance='Most accurate, but very slow'
277 elif [ $strategy = "L-INS-i" ]; then
278 explanation='Iterative refinement method incorporating LOCAL pairwise alignment information'
279 performance='Probably most accurate, very slow'
280 elif [ $strategy = "E-INS-i" ]; then
281 explanation='Iterative refinement method incorporating LOCAL pairwise alignment with generalized affine gap costs (Altschul 1998)'
282 performance='Suitable for sequences with long unalignable regions, very slow'
283 elif [ $strategy = "G-INS-i" ]; then
284 explanation='Iterative refinement method incorporating GLOBAL pairwise alignment information'
285 performance='Suitable for sequences of similar lengths, very slow'
286 elif [ $strategy = "F-INS-1" ]; then
287 explanation='Progressive method incorporating LOCAL pairwise alignment information'
288 elif [ $strategy = "L-INS-1" ]; then
289 explanation='Progressive method incorporating LOCAL pairwise alignment information'
290 elif [ $strategy = "G-INS-1" ]; then
291 explanation='Progressive method incorporating GLOBAL pairwise alignment information'
292 elif [ $strategy = "FFT-NS-i" -o $strategy = "NW-NS-i" ]; then
293 explanation='Iterative refinement method (max. '$iterate' iterations)'
294 if [ $iterate -gt 2 ]; then
295 performance='Accurate but slow'
297 performance='Standard'
299 elif [ $strategy = "FFT-NS-2" -o $strategy = "NW-NS-2" ]; then
300 explanation='Progressive method (guide trees were built '$cycle' times.)'
301 performance='Fast but rough'
302 elif [ $strategy = "FFT-NS-1" -o $strategy = "NW-NS-1" ]; then
303 explanation='Progressive method (rough guide tree was used.)'
304 performance='Very fast but very rough'
307 if [ $outputformat = "clustal" -a $outorder = "aligned" ]; then
308 outputopt=" -c $strategy -r order "
309 elif [ $outputformat = "clustal" -a $outorder = "input" ]; then
310 outputopt=" -c $strategy "
311 elif [ $outputformat = "pir" -a $outorder = "aligned" ]; then
312 outputopt=" -f -r order "
317 TMPFILE=/tmp/`basename $0`.`whoami`.$$.`date +%y%m%d%H%M%S`
318 TMPFILE=/tmp/$progname.$$
320 mkdir $TMPFILE || er=1
321 trap "rm -r $TMPFILE " 0
322 if [ $# -eq 1 ]; then
323 if [ -r "$1" -o "$1" = - ]; then
324 cat "$1" | tr "\r" "\n" > $TMPFILE/infile
331 cat "$1" | tr "\r" "\n" > $TMPFILE/seed$#
332 seednseq=$seednseq" "`grep -c '^[>|=]' $TMPFILE/seed$#`
333 seedfilesintmp=$seedfilesintmp" "seed$#
337 # echo $seedfilesintmp
340 echo "Cannot open $1." 1>&2
349 if [ $er -eq 1 ]; then
351 echo "MAFFT" $version 1>&2
353 echo " References: " 1>&2
354 echo " Katoh et al., 2002, NAR 30: 3059-3066" 1>&2
355 echo " Katoh et al., 2005, NAR 33: 511-518" 1>&2
356 echo " http://www.biophys.kyoto-u.ac.jp/~katoh/programs/align/mafft" 1>&2
358 # echo "Usage: `basename $0` [options] inputfile > outputfile" 1>&2
359 echo " Options: " 1>&2
360 echo " --localpair : All pairwise local alignment information is included" 1>&2
361 echo " to the objective function. default: off" 1>&2
362 echo " --globalpair : All pairwise global alignment information is included" 1>&2
363 echo " to the objective function. default: off" 1>&2
364 echo " --op # : Gap opening penalty (>0). default: $defaultgop " 1>&2
365 echo " --ep # : Offset (>0, works like gap extension penalty). " 1>&2
366 echo " default: $defaultaof " 1>&2
367 echo " --bl #, --jtt # : Scoring matrix. default: BLOSUM62" 1>&2
368 echo " Alternatives are BLOSUM (--bl) 30, 45, 62, 80, " 1>&2
369 echo " or JTT (--jtt) # PAM. " 1>&2
370 echo " --nuc or --amino : Sequence type. default: auto" 1>&2
371 echo " --retree # : The number of tree building in progressive method " 1>&2
372 echo " (see the paper for detail). default: $defaultcycle " 1>&2
373 echo " --maxiterate # : Maximum number of iterative refinement. default: $defaultiterate " 1>&2
374 if [ $defaultfft -eq 1 ]; then
375 echo " --fft or --nofft: FFT is enabled or disabled. default: enabled" 1>&2
377 echo " --fft or --nofft: FFT is enabled or disabled. default: disabled" 1>&2
379 # if [ $defaultrough -eq 1 ]; then
380 # echo " --rough : Rough alignment, for >1,000 sequences. default: enabled" 1>&2
382 # echo " --rough : Rough alignment, for >1,000 sequences. default: disabled" 1>&2
384 echo " --memsave: Memory saving mode (beta). default: off" 1>&2
385 echo " --clustalout: Output: clustal format (not tested). default: fasta" 1>&2
386 echo " --reorder: Outorder: aligned (not tested). default: input order" 1>&2
387 echo " --quiet : Do not report progress." 1>&2
389 echo " Input format: fasta format" 1>&2
391 echo " Typical usages:" 1>&2
392 echo " % mafft --maxiterate 1000 --localpair input > output" 1>&2
393 echo " L-INS-i (most accurate in many cases;" 1>&2
394 echo " assumes there is only one alignable domain)" 1>&2
396 echo " % mafft --maxiterate 1000 --genafpair input > output" 1>&2
397 echo " E-INS-i (works even if there are many unalignable residues" 1>&2
398 echo " between alignable domains)" 1>&2
400 echo " % mafft --maxiterate 1000 --globalpair input > output" 1>&2
401 echo " G-INS-i (suitable for globally alignable sequences)" 1>&2
403 echo " % mafft --maxiterate 1000 input > output" 1>&2
404 echo " FFT-NS-i (accurate and slow, iterative refinement method)" 1>&2
406 echo " % mafft --retree 2 input > output (DEFAULT; same as mafft input > output)" 1>&2
407 echo " FFT-NS-2 (rough and fast; progressive method)" 1>&2
409 echo " % mafft --retree 1 input > output" 1>&2
410 echo " FFT-NS-1 (very rough and very fast, applicable to >5,000 sequences;" 1>&2
411 echo " progressive method with a rough guide tree)" 1>&2
418 if [ $rough -gt 0 ]; then
419 "$prefix/splitseq" infile 500
420 for spfile in sp-[0-9]*[0-9]
423 nseq=`grep -c '^[>|=]' $spfile`
425 if [ $nseq -eq 1 ]; then
426 cp $spfile $spfile.aln
428 "$prefix/sextet5" $seqtype < $spfile > /dev/null 2>&1 || exit 1
429 "$prefix/tbfast" $memopt $seqtype $model -f "-"$gop -h "-"$aof $param_fft -Ax < $spfile > /dev/null 2>&1 || exit 1
430 cat pre > $spfile.aln
434 for alfile in sp-[0-9]*[0-9].aln
436 ngroup=`expr $ngroup + 1`
438 if [ $ngroup -eq 1 ]; then
441 "$prefix/mafft-profile" -A alall $alfile > altmp
447 if [ $quiet -gt 0 ]; then
448 if [ $seed != "x" ]; then
450 cat /dev/null > infile
451 cat /dev/null > hat3.seed
453 # echo "seednseq="$seednseq
454 # echo "seedoffset="$seedoffset
460 $prefix/multi2hat3s -t $nseq -o $seedoffset -i seed$# >> infile 2>/dev/null || exit 1
461 cat hat3 >> hat3.seed
463 seedoffset=`expr $seedoffset + $1`
465 # echo "seedoffset="$seedoffset
468 # echo "seedoffset="$seedoffset
469 cat infile2 >> infile
471 cat /dev/null > hat3.seed
474 if [ $distance = "fasta" ]; then
475 "$prefix/dndfast7" $swopt < infile > /dev/null 2>&1 || exit 1
476 cat hat3.seed hat3 > hatx
478 "$prefix/tbfast" $seqtype $model -f "-"$gop -h "-"$aof $param_fft $localparam -Ax < infile > /dev/null 2>&1 || exit 1
479 elif [ $distance = "blast" ]; then
480 "$prefix/dndblast" < infile > /dev/null 2>&1 || exit 1
481 cat hat3.seed hat3 > hatx
483 "$prefix/tbfast" $seqtype $model -f "-"$gop -h "-"$aof $param_fft $localparam -Ax < infile > /dev/null 2>&1 || exit 1
484 elif [ $distance = "global" ]; then
485 "$prefix/pairlocalalign" $seqtype $model -f "-"$gop -h "-"$aof -F < infile > /dev/null 2>&1 || exit 1
486 cat hat3.seed hat3 > hatx
488 "$prefix/tbfast" $seqtype $model -f "-"$gop -h "-"$aof $param_fft $localparam -Ax < infile > /dev/null 2>&1 || exit 1
489 elif [ $distance = "local" ]; then
490 "$prefix/pairlocalalign" $seqtype -b 62 -g $lexp -f $lgop -h $laof -L < infile > /dev/null 2>&1 || exit 1
491 cat hat3.seed hat3 > hatx
493 "$prefix/tbfast" $seqtype $model -f "-"$gop -h "-"$aof $param_fft $localparam -Ax < infile > /dev/null 2>&1 || exit 1
494 elif [ $distance = "genaf" ]; then
495 "$prefix/pairlocalalign" $seqtype -b 62 -g $lexp -f $lgop -h $laof -O $LGOP -E $LEXP -N < infile > /dev/null 2>&1 || exit 1
496 cat hat3.seed hat3 > hatx
498 "$prefix/tbfast" $seqtype $model -f "-"$gop -h "-"$aof $param_fft $localparam -Ax < infile > /dev/null 2>&1 || exit 1
500 "$prefix/disttbfast" $memopt $seqtype $model -f "-"$gop -h "-"$aof $param_fft -x < infile > pre 2>/dev/null || exit 1
503 while [ $cycle -gt 1 ]
505 "$prefix/tbfast" $memopt $seqtype $model -f "-"$gop -h "-"$aof $param_fft $localparam -Jx < pre > /dev/null 2>&1 || exit 1
506 cycle=`expr $cycle - 1`
508 if [ $iterate -gt 0 ]; then
509 if [ $distance = "sixtuples" ]; then
510 "$prefix/dndpre" < pre > /dev/null 2>&1 || exit 1
512 "$prefix/dvtditr" $memopt $scorecalcopt $localparam -F -z 50 $seqtype $model -f "-"$gop -h "-"$aof -c -I $iterate $param_it < pre > /dev/null 2>&1 || exit 1
515 if [ $seed != "x" ]; then
517 cat /dev/null > infile
518 cat /dev/null > hat3.seed
520 # echo "seednseq="$seednseq
521 # echo "seedoffset="$seedoffset
527 $prefix/multi2hat3s -t $nseq -o $seedoffset -i seed$# >> infile || exit 1
528 cat hat3 >> hat3.seed
530 seedoffset=`expr $seedoffset + $1`
532 # echo "seedoffset="$seedoffset
535 # echo "seedoffset="$seedoffset
536 cat infile2 >> infile
538 cat /dev/null > hat3.seed
541 if [ $distance = "fasta" ]; then
542 "$prefix/dndfast7" $swopt < infile > /dev/null || exit 1
543 cat hat3.seed hat3 > hatx
545 "$prefix/tbfast" $seqtype $model -f "-"$gop -h "-"$aof $param_fft $localparam -Ax < infile > /dev/null || exit 1
546 elif [ $distance = "blast" ]; then
547 "$prefix/dndblast" < infile > /dev/null || exit 1
548 cat hat3.seed hat3 > hatx
550 "$prefix/tbfast" $seqtype $model -f "-"$gop -h "-"$aof $param_fft $localparam -Ax < infile > /dev/null || exit 1
551 elif [ $distance = "global" ]; then
552 "$prefix/pairlocalalign" $seqtype $model -f "-"$gop -h "-"$aof -F < infile > /dev/null || exit 1
553 cat hat3.seed hat3 > hatx
555 "$prefix/tbfast" $seqtype $model -f "-"$gop -h "-"$aof $param_fft $localparam -Ax < infile > /dev/null || exit 1
556 elif [ $distance = "local" ]; then
557 "$prefix/pairlocalalign" $seqtype -b 62 -g $lexp -f $lgop -h $laof -L < infile > /dev/null || exit 1
558 cat hat3.seed hat3 > hatx
560 "$prefix/tbfast" $seqtype $model -f "-"$gop -h "-"$aof $param_fft $localparam -Ax < infile > /dev/null || exit 1
561 elif [ $distance = "genaf" ]; then
562 "$prefix/pairlocalalign" $seqtype -b 62 -g $lexp -f $lgop -h $laof -O $LGOP -E $LEXP -N < infile > /dev/null || exit 1
563 cat hat3.seed hat3 > hatx
565 "$prefix/tbfast" $seqtype $model -f "-"$gop -h "-"$aof $param_fft $localparam -Ax < infile > /dev/null || exit 1
567 "$prefix/disttbfast" $memopt $seqtype $model -f "-"$gop -h "-"$aof $param_fft -x < infile > pre || exit 1
570 while [ $cycle -gt 1 ]
572 "$prefix/tbfast" $memopt $seqtype $model -f "-"$gop -h "-"$aof $param_fft $localparam -Jx < pre > /dev/null || exit 1
573 cycle=`expr $cycle - 1`
575 if [ $iterate -gt 0 ]; then
576 if [ $distance = "sixtuples" ]; then
577 "$prefix/dndpre" < pre > /dev/null 2>&1 || exit 1
579 "$prefix/dvtditr" $memopt $scorecalcopt $localparam -F -z 50 $seqtype $model -f "-"$gop -h "-"$aof -c -I $iterate $param_it < pre > /dev/null || exit 1
582 if [ $coreout -eq 1 ]; then
583 "$prefix/setcore" -w $corewin -i $corethr $coreext < pre > pre2
586 if [ "$outputopt" = "null" ]; then
589 "$prefix/f2cl" $outputopt < pre || exit 1
593 if [ $quiet -eq 0 ]; then
595 if [ $distance = "fasta" ]; then
596 echo "Pairwise alignments were computed by FASTA" 1>&2
597 echo "(Pearson & Lipman, 1988, PNAS 85:2444-2448)" 1>&2
599 if [ $distance = "blast" ]; then
600 echo "Pairwise alignments were computed by BLAST" 1>&2
601 echo "(Altschul et al., 1997, NAR 25:3389-3402)" 1>&2
604 echo 'Strategy:' 1>&2
605 printf ' '$strategy 1>&2
606 echo ' ('$performance')' 1>&2
607 echo ' '$explanation 1>&2
609 echo "Type '$0 --help' for other options." 1>&2
610 echo "--memsave is for beta testing" 1>&2
618 if [ $os != "darwin" ]; then
619 echo "checking nawk" 1>&2
620 tmpawk=`which nawk 2>/dev/null | awk '{print $1}'`
621 if [ -x $tmpawk ]; then
625 echo "checking gawk" 1>&2
626 tmpawk=`which gawk 2>/dev/null | awk '{print $1}'`
627 if [ -x $tmpawk ]; then
632 echo "prog="$prog 1>&2
639 export defaultiterate
643 prefix = ENVIRON["prefix"];
644 version = ENVIRON["version"];
645 myself = ENVIRON["myself"];
646 defaultgop = ENVIRON["defaultgop"]
647 defaultaof = ENVIRON["defaultaof"]
648 defaultfft = ENVIRON["defaultfft"]
649 defaultcycle = ENVIRON["defaultcycle"]
650 defaultiterate = ENVIRON["defaultiterate"]
654 printf( "\n" ) > "/dev/tty";
655 printf( "---------------------------------------------------------------------\n" ) > "/dev/tty";
656 printf( "\n" ) > "/dev/tty";
657 printf( " MAFFT %s\n", version ) > "/dev/tty";
658 printf( "\n" ) > "/dev/tty";
659 printf( " K. Katoh, K. Misawa, K. Kuma and T. Miyata (2002)\n" ) > "/dev/tty";
660 printf( " Nucleic Acids Research 30: 3059-3066.\n" ) > "/dev/tty";
661 printf( " http://www.biophys.kyoto-u.ac.jp/~katoh/programs/align/mafft\n" ) > "/dev/tty";
662 printf( "---------------------------------------------------------------------\n" ) > "/dev/tty";
667 printf( "\n" ) > "/dev/tty";
668 printf( "Input file? (fasta format)\n@ " ) > "/dev/tty";
669 res = getline < "/dev/tty";
671 if( res == 0 || NF == 0 )
673 infile0 = sprintf( "%s", $1 );
674 infile = sprintf( "%s", $1 );
676 res = getline < infile;
679 printf( "%s: No such file.\n\n", infile );
681 printf( "%s: Empty.\n", infile );
684 printf( "OK. infile = %s\n\n", infile );
692 printf( "\n" ) > "/dev/tty";
693 printf( "Output file?\n" ) > "/dev/tty";
694 printf( "@ " ) > "/dev/tty";
695 res = getline < "/dev/tty";
697 if( res == 0 || NF == 0 )
701 outfile = sprintf( "%s", $1 );
702 printf( "OK. outfile = %s\n\n", outfile );
710 retree = defaultcycle
712 printf( "Number of tree-rebuilding?\n" ) > "/dev/tty";
713 printf( "@ [%d] ", retree ) > "/dev/tty";
714 res = getline < "/dev/tty";
722 if( retree < 1 || 10 < retree )
726 printf( "OK. %d\n\n", retree );
733 niterate = defaultiterate;
735 printf( "Maximum number of iterations?\n" ) > "/dev/tty";
736 printf( "@ [%d] ", niterate ) > "/dev/tty";
737 res = getline < "/dev/tty";
745 if( niterate < 0 || 1000 < niterate )
749 printf( "OK. %d\n\n", niterate );
758 printf( "Use fft?\n" ) > "/dev/tty";
759 printf( "@ [%s] ", fft?"Yes":"No" ) > "/dev/tty";
760 res = getline < "/dev/tty";
768 else if( NF == 0 || $0 ~ /^[Yy]/ )
773 else if( NF == 0 || $0 ~ /^[Nn]/ )
781 printf( "OK. FFT is enabled.\n\n" );
782 fftparam = " --fft ";
786 printf( "OK. FFT is disabled.\n\n" );
787 fftparam = " --nofft ";
794 printf( "Scoring matrix? (ignored when DNA sequence is input.)\n" ) > "/dev/tty";
795 printf( " 1. BLOSUM 30\n" ) > "/dev/tty";
796 printf( " 2. BLOSUM 45\n" ) > "/dev/tty";
797 printf( " 3. BLOSUM 62\n" ) > "/dev/tty";
798 printf( " 4. BLOSUM 80\n" ) > "/dev/tty";
799 printf( " 5. JTT 200\n" ) > "/dev/tty";
800 printf( " 6. JTT 100\n" ) > "/dev/tty";
801 printf( "@ [%d] ", scoringmatrix ) > "/dev/tty";
802 res = getline < "/dev/tty";
809 scoringmatrix = 0 + $1;
810 if( scoringmatrix < 1 || 6 < scoringmatrix )
817 if( scoringmatrix == 1 )
818 scoringparam = " --bl 30 ";
819 else if( scoringmatrix == 2 )
820 scoringparam = " --bl 45 ";
821 else if( scoringmatrix == 3 )
822 scoringparam = " --bl 62 ";
823 else if( scoringmatrix == 4 )
824 scoringparam = " --bl 80 ";
825 else if( scoringmatrix == 5 )
826 scoringparam = " --jtt 200 ";
827 else if( scoringmatrix == 6 )
828 scoringparam = " --jtt 100 ";
829 printf( "OK. %s\n\n",scoringparam );
833 penalty = 0.0 + defaultgop;
834 offset = 0.0 + defaultaof;
836 printf( "Parameters (gap opening penalty, offset)?\n", penalty, offset ) > "/dev/tty";
837 printf( "@ [%5.3f, %5.3f] ", penalty, offset ) > "/dev/tty";
838 res = getline < "/dev/tty";
851 if( penalty <= 0.0 || 10.0 < penalty )
853 else if( offset <= 0.0 || 10.0 < offset )
857 printf( "OK. %5.3f %5.3f\n\n", penalty, offset );
862 command = sprintf( "%s %s --retree %d --maxiterate %d %s --op %f --ep %f %s > %s", myself, fftparam, retree, niterate, scoringparam, penalty, offset, infile, outfile );
863 printf( "%s\n\n", command );
871 printf( "@ [Y] " ) > "/dev/tty";
872 res = getline < "/dev/tty";
876 else if( NF == 0 || $0 ~ /^[Yy]/ )