From d4371f070dd23ca62ba43d1b281891ac1565cb96 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 18 Mar 2002 14:31:09 +0000 Subject: [PATCH] use average and overall percentage identity methods svn path=/bioperl-run/branches/branch-1-0-0/; revision=13051 --- t/EMBOSS.t | 9 ++++++--- t/TCoffee.t | 8 +++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/t/EMBOSS.t b/t/EMBOSS.t index d13c30ec..660d86b3 100644 --- a/t/EMBOSS.t +++ b/t/EMBOSS.t @@ -17,7 +17,7 @@ BEGIN { use lib 't'; } use Test; - $NTESTS = 16; + $NTESTS = 18; plan tests => $NTESTS } use Bio::Factory::EMBOSS; @@ -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); diff --git a/t/TCoffee.t b/t/TCoffee.t index bc32a2e2..9cfc8697 100644 --- a/t/TCoffee.t +++ b/t/TCoffee.t @@ -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); }