Add dna_to_aa_aln method and tests
[bioperl-live.git] / t / AlignIO / maf.t
blobac73f0fd2bc26d9d9958f4b99f91907b6ab30ed4
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id: maf.t 14971 2008-10-28 16:08:52Z cjfields $
4 use strict;
6 BEGIN {
7         use lib '.';
8     use Bio::Root::Test;
9     
10     test_begin(-tests => 11);
11         
12         use_ok('Bio::AlignIO::maf');
15 my $DEBUG = test_debug();
17 my ($str,$aln,$strout,$status);
19 # MAF
20 $str = Bio::AlignIO->new(
21           '-file' => test_input_file("humor.maf"));
22 $aln = $str->next_aln();
23 isa_ok($aln,'Bio::Align::AlignI');
24 is $aln->get_seq_by_pos(1)->get_nse, 'NM_006987/5000-1', "maf input test";
25 is $aln->get_seq_by_pos(1)->strand, -1;
27 # MAF - bug 2453
28 $str = Bio::AlignIO->new(
29           '-file' => test_input_file("bug2453.maf"));
30 $aln = $str->next_aln();
31 isa_ok($aln,'Bio::Align::AlignI');
32 is $aln->get_seq_by_pos(1)->get_nse, 'hg16.chr7/27578829-27578866', "maf input test";
33 is $aln->get_seq_by_pos(1)->strand, 1;
34 $aln = $str->next_aln();
35 is $aln->get_seq_by_pos(1)->get_nse, 'hg16.chr7/27699740-27699745', "maf input test";
36 is $aln->get_seq_by_pos(1)->strand, 1;
37 $aln = $str->next_aln();
38 is $aln->get_seq_by_pos(1)->get_nse, 'hg16.chr7/27707222-27707234', "maf input test";
39 is $aln->get_seq_by_pos(1)->strand, 1;