2 ## Bioperl Test Harness Script for Modules
10 test_begin(-tests => 17);
11 use_ok(' Bio::Tools::Run::Alignment::MAFFT');
12 use_ok(' Bio::AlignIO');
13 use_ok(' Bio::SeqIO');
16 END { unlink qw(cysprot.dnd cysprot1a.dnd) }
18 my @params = (-verbose => $DEBUG, 'quiet' => 1);
19 my $factory = Bio::Tools::Run::Alignment::MAFFT->new(@params);
21 isa_ok $factory,'Bio::Tools::Run::Alignment::MAFFT';
23 my $inputfilename = test_input_file("cysprot.fa");
27 test_skip(-requires_executable => $factory,
30 $factory->executable($factory->method);
32 test_skip(-requires_executable => $factory,
35 my $version = $factory->version;
37 $aln = $factory->align($inputfilename);
39 is( $aln->num_sequences, 7);
41 my $str = Bio::SeqIO->new('-file' =>
42 test_input_file("cysprot.fa"),
43 '-format' => 'Fasta');
46 while ( my $seq = $str->next_seq() ) {
47 push (@seq_array, $seq) ;
50 my $seq_array_ref = \@seq_array;
52 $aln = $factory->align($seq_array_ref);
53 is $aln->num_sequences, 7;
54 my $s1_perid = $aln->average_percentage_identity;
55 cmp_ok(int($s1_perid), '>=', 42, '42 or 43 expected');
57 for my $method ( grep { !/rough/ } $factory->methods ) {
58 $factory->method($method);
59 $aln = $factory->align($inputfilename);
60 is $aln->num_sequences, 7;
61 my $s1_perid = $aln->average_percentage_identity;