Skip to content

Commit

Permalink
use average and overall percentage identity methods
Browse files Browse the repository at this point in the history
svn path=/bioperl-run/branches/branch-1-0-0/; revision=13051
  • Loading branch information
hyphaltip committed Mar 18, 2002
1 parent 75d16d9 commit d4371f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
9 changes: 6 additions & 3 deletions t/EMBOSS.t
Expand Up @@ -17,7 +17,7 @@ BEGIN {
use lib 't';
}
use Test;
$NTESTS = 16;
$NTESTS = 18;
plan tests => $NTESTS }

use Bio::Factory::EMBOSS;
Expand Down Expand Up @@ -102,13 +102,16 @@ ok( $alnin);
my $aln = $alnin->next_aln;
ok($aln);
ok($aln->length, 43);
ok($aln->percentage_identity, 100);
ok($aln->overall_percentage_identity, 100);
ok($aln->average_percentage_identity, 100);

my ($first) = $aln->each_seq();
ok($first->seq(), 'SCWSFSTTGNVEGQHFISQNKLVSLSEQNLVDCDHECMEYEGE');
$aln = $alnin->next_aln;
ok($aln);
ok($aln->length, 339);
ok(sprintf("%.2f",$aln->percentage_identity), 33.04);
ok(sprintf("%.2f",$aln->overall_percentage_identity), 33.04);
ok(sprintf("%.2f",$aln->average_percentage_identity), 40.58);

my $cons = $factory->program('cons');
$cons->verbose(0);
Expand Down
8 changes: 5 additions & 3 deletions t/TCoffee.t
Expand Up @@ -103,11 +103,13 @@ $str2 = Bio::SeqIO->new(-file=> Bio::Root::IO->catfile("t","data","cysprot1b.fa"
my $seq = $str2->next_seq();

ok $aln1->no_sequences, 3;
ok( int($aln1->percentage_identity), 24) ;
ok( int($aln1->average_percentage_identity), 39);
$aln = $factory->profile_align($aln1,$seq);
ok( $aln->no_sequences, 4);
if( $version <= 1.22 ) {
ok( int($aln->percentage_identity), 18);
ok( int($aln->overall_percentage_identity), 18);
ok( int($aln->average_percentage_identity), 44);
} else {
ok( int($aln->percentage_identity), 21);
ok( int($aln->overall_percentage_identity), 21);
ok( int($aln->average_percentage_identity), 39);
}

0 comments on commit d4371f0

Please sign in to comment.