1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id: mega.t 14971 2008-10-28 16:08:52Z cjfields $
10 test_begin(-tests => 6);
12 use_ok('Bio::AlignIO::mega');
15 my $DEBUG = test_debug();
17 my ($str,$aln,$strout,$status);
20 $str = Bio::AlignIO->new('-format' => 'mega',
21 '-file' => test_input_file("testaln.mega"));
23 $aln = $str->next_aln();
24 isa_ok($aln,'Bio::Align::AlignI');
25 is($aln->get_seq_by_pos(1)->get_nse,'Human/1-141');
26 is($aln->get_seq_by_pos(2)->get_nse,'Horse/1-144');
28 is($aln->get_seq_by_pos(3)->subseq(1,10), 'V-LSAADKGN');
30 $strout = Bio::AlignIO->new('-format' => 'mega',
31 '-file' => ">" .test_output_file());
33 $status = $strout->write_aln($aln);
34 is $status, 1, "mega output test";