1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 19);
12 use_ok('Bio::Align::Utilities',qw(aa_to_dna_aln bootstrap_replicates) );
13 use_ok('Bio::AlignIO');
17 my $in = Bio::AlignIO->new(-format => 'clustalw',
18 -file => test_input_file('pep-266.aln'));
19 my $aln = $in->next_aln();
20 isa_ok($aln, 'Bio::Align::AlignI');
23 my $seqin = Bio::SeqIO->new(-format => 'fasta',
24 -file => test_input_file('cds-266.fas'));
25 # get the cds sequences
27 while( my $seq = $seqin->next_seq ) {
28 $cds_seq{$seq->display_id} = $seq;
31 my $cds_aln = &aa_to_dna_aln($aln,\%cds_seq);
33 my @aa_seqs = $aln->each_seq;
35 for my $cdsseq ( $cds_aln->each_seq ) {
36 my $peptrans = $cdsseq->translate();
37 my $aaseq = shift @aa_seqs;
38 is($peptrans->seq(),$aaseq->seq());
41 my $bootstraps = &bootstrap_replicates($aln,10);
43 is(scalar @$bootstraps, 10);