2 ## Bioperl Test Harness Script for Modules
7 test_begin(-tests => 8);
8 use_ok('Bio::Tools::Run::Alignment::Kalign');
9 use_ok('Bio::AlignIO');
13 END { unlink qw(cysprot.dnd cysprot1a.dnd) }
16 my $factory = Bio::Tools::Run::Alignment::Kalign->new(@params);
17 my $inputfilename = test_input_file("cysprot.fa");
21 test_skip(-requires_executable => $factory, -tests => 5);
22 my $version = $factory->version;
23 is($version >= 2, 1, "Code tested only on kalign versions >= 2" );
24 $aln = $factory->align($inputfilename);
26 is( $aln->num_sequences, 7);
28 my $str = Bio::SeqIO->new('-file' => test_input_file("cysprot.fa"),
29 '-format' => 'Fasta');
32 while ( my $seq = $str->next_seq() ) {
33 push (@seq_array, $seq) ;
36 my $seq_array_ref = \@seq_array;
38 $aln = $factory->align($seq_array_ref);
39 is $aln->num_sequences, 7;
40 my $s1_perid = $aln->average_percentage_identity;
41 is(int($s1_perid), 42);