1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 13);
12 use_ok('Bio::Align::Utilities', qw(:all));
13 use_ok('Bio::SimpleAlign');
14 use_ok('Bio::PrimarySeq');
15 use_ok('Bio::LocatableSeq');
16 use_ok('Bio::AlignIO');
19 my $DEBUG = test_debug();
21 my $aa_align = Bio::SimpleAlign->new();
22 $aa_align->add_seq(Bio::LocatableSeq->new(-id => "n1", -seq => "MLIDVG-MLVLR"));
23 $aa_align->add_seq(Bio::LocatableSeq->new(-id => "n2", -seq => "MLIDVRTPLALR"));
24 $aa_align->add_seq(Bio::LocatableSeq->new(-id => "n3", -seq => "MLI-VR-SLALR"));
27 $dnaseqs{'n1'} = Bio::PrimarySeq->new(-id => "n1", -seq => 'atgctgatagacgtaggcatgctagtactgaga');
28 $dnaseqs{'n2'} = Bio::PrimarySeq->new(-id => "n2", -seq => 'atgctgatcgacgtacgcaccccgctagcactcaga');
29 $dnaseqs{'n3'} = Bio::PrimarySeq->new(-id => "n3", -seq => 'atgttgattgtacgctcgcttgcacttaga');
32 ok( $dna_aln = &aa_to_dna_aln($aa_align, \%dnaseqs));
34 Bio::AlignIO->new(-format=>'clustalw')->write_aln($dna_aln);
37 is $dna_aln->length, 36;
38 is $dna_aln->no_residues, 99;
39 is $dna_aln->no_sequences, 3;
40 is $dna_aln->consensus_string(50), "atgctgat?gacgtacgc????cgctagcact?aga";
42 $dna_aln->verbose(-1);
44 ok $replicates = &bootstrap_replicates($dna_aln,3);
46 is scalar @$replicates, 3;
47 my $repl_aln = pop @$replicates;
48 is $repl_aln->no_sequences, 3;
53 ##my $out = IO::String->new($string);
55 ##my $strout = Bio::AlignIO->new(-fh => $out,'-format' => 'pfam');
56 ##$strout->write_aln($repl_aln);