#!/bin/bash
set -e

pkg='t-coffee'

if [ "$AUTOPKGTEST_TMP" = "" ] ; then
  AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
fi

cp -a /usr/share/doc/${pkg}/examples/* $AUTOPKGTEST_TMP

cd $AUTOPKGTEST_TMP
find . -name "*.gz" -exec gunzip \{\} \;

t_coffee sample_seq1.fasta    
t_coffee sample_seq1.fasta -mode quickaln    
t_coffee sample_seq1.fasta -mode quickaln -ndiag=10    
t_coffee -aln=sproteases_small.cw_aln, sproteases_small.muscle, sproteases_small.tc_aln -outfile=combined_aln.aln    
t_coffee -infile=sproteases_small.aln -special_mode=evaluate    
t_coffee -other_pg seq_reformat -in sproteases_small.aln -output fasta_aln > sproteases_small.fasta_aln   
t_coffee -other_pg seq_reformat -in sproteases_small.aln -output msf > sproteases_small.msf   
t_coffee -other_pg seq_reformat -in sproteases_small.aln -output fasta_seq > sproteases_small.fasta   
t_coffee -other_pg seq_reformat -in sproteases_small.aln -action +lower -output clustalw    
t_coffee -other_pg seq_reformat -in sample_aln1.aln -action +upper +edit_residue hmgb_chite 10 lower    
t_coffee -other_pg seq_reformat -in sample_aln1.aln -in3 sample_aln1.aln -action +upper +3evaluate idmat +lower ''    
t_coffee -other_pg seq_reformat -in sproteases_large.fasta -output code_name > sproteases_large.code_name   
t_coffee -other_pg seq_reformat -code sproteases_large.code_name -in sproteases_large.fasta >sproteases_large.coded.fasta   
t_coffee -other_pg seq_reformat -decode sproteases_large.code_name -in sproteases_large.coded.fasta    
t_coffee -other_pg seq_reformat -in sample_aln1.aln -in3 sample_aln1.aln -action  +3convert a0 -output color_html > colored.html   
t_coffee -other_pg seq_reformat -in sample_aln1.aln -action +color_residue hmgb_chite 10 1 -output color_html > color.html   
t_coffee -other_pg seq_reformat -in sample_aln1.aln -in3 sample_aln1.aln -action +3evaluate pam250mt -output color_html > color.html   
t_coffee -other_pg seq_reformat -in sample_aln1.aln -in3 sample_aln1.aln -action +3evaluate boxshade -output color_html > color.html   
t_coffee -other_pg seq_reformat -in=sample_aln6.aln -output=clustalw_aln -out=cache.aln -action +convert 'Aa1' '.--' +convert '#0'    
t_coffee -other_pg seq_reformat -in=sample_aln6.aln -output=fasta_seq -out=cache.seq -action +convert 'Aa1' '.--' +convert '#0'   
t_coffee -other_pg seq_reformat -in=sample_aln6.aln -output=fasta_seq -out=cache -action +convert 'Aa1' '.--'    
t_coffee -other_pg seq_reformat -in=sample_aln6.aln -struc_in=sample_aln6.cache -struc_in_f number_fasta -output=color_html -out=x.html    

