1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id: clustalw.t 14971 2008-10-28 16:08:52Z cjfields $
10 test_begin(-tests => 6);
12 use_ok('Bio::AlignIO::clustalw');
15 my $DEBUG = test_debug();
17 my ($str,$aln,$strout,$status);
20 my $io = Bio::AlignIO->new(
21 -file => test_input_file("testaln.clustalw") );
22 $aln = $io->next_aln();
23 isa_ok($aln,'Bio::Align::AlignI');
24 is $aln->consensus_string, "MNEGEHQIKLDELFEKLLRARKIFKNKDVLRHSWEPKDLPHRHEQIEA".
25 "LAQILVPVLRGETMKIIFCGHHACELGEDRGTKGFVIDELKDVDEDRNGKVDVIEINCEHMDTHYRVLPNIAKLF".
26 "DDCTGIGVPMHGGPTDEVTAKLKQVIDMKERFVIIVLDEIDKLVKKSGDEVLYSLTRINTELKRAKVSVIGISND".
27 "LKFKEYLDPRVLSSLSEEEVVFPPYDANQLRDILTQRAEEAFYPGVLDEGVIPLCAALAAREHGDARKALDLLRV".
28 "AGEIAEREGASKVTEKHVWKAQEKIEQDMMEEVIKTLPLQSKVLLYAIVLLDENGDLPANTGDVYAVYRELCEYI".
29 "DLEPLTQRRISDLINELDMLGIINAKVVSKGRYGRTKEIRLMVTSYKIRNVLRYDYSIQPLLTISLKSEQRRLI",
30 "clustalw consensus_string test";
32 my $outfile = test_output_file();
33 $strout = Bio::AlignIO->new(
34 '-file' => ">$outfile",
35 '-format' => 'clustalw');
36 $status = $strout->write_aln($aln);
37 is $status, 1, "clustalw output test";
39 $str = Bio::AlignIO->new(
41 '-format' => 'clustalw');
42 $aln = $str->next_aln($aln);
43 isa_ok($aln,'Bio::Align::AlignI');
44 is $aln->get_seq_by_pos(1)->get_nse, 'P84139/1-420', "clustalw input test";