[Bioperl-guts-l] [15049] bioperl-live/trunk/t/SeqIO/interpro.t: adding more diagnostic messages to t/SeqIO/intepro.t

Dave Messina dave_messina at dev.open-bio.org
Sat Nov 29 14:45:18 EST 2008


Revision: 15049
Author:   dave_messina
Date:     2008-11-29 14:45:17 -0500 (Sat, 29 Nov 2008)

Log Message:
-----------
adding more diagnostic messages to t/SeqIO/intepro.t

Modified Paths:
--------------
    bioperl-live/trunk/t/SeqIO/interpro.t

Modified: bioperl-live/trunk/t/SeqIO/interpro.t
===================================================================
--- bioperl-live/trunk/t/SeqIO/interpro.t	2008-11-28 13:24:34 UTC (rev 15048)
+++ bioperl-live/trunk/t/SeqIO/interpro.t	2008-11-29 19:45:17 UTC (rev 15049)
@@ -17,24 +17,24 @@
 
 my $t_file = test_input_file('test.interpro');
 my $a_in = Bio::SeqIO->new( -file => $t_file,
-									 -verbose => $verbose,
-									 -format => 'interpro');
+							-verbose => $verbose,
+							-format => 'interpro');
 isa_ok($a_in, 'Bio::SeqIO');
 
 my $seq = $a_in->next_seq();
-ok($seq);
+ok($seq, 'seq obj is defined');
 isa_ok($seq, 'Bio::Seq::RichSeq');
-is(scalar( $seq->get_SeqFeatures() ),6);
+is(scalar( $seq->get_SeqFeatures() ), 6, 'right number of SeqFeatures');
 
 my($feat) = $seq->get_SeqFeatures();
 isa_ok($feat,'Bio::SeqFeature::Generic');
 
-is($feat->display_name,'Retinoblastoma-associated protein, B-box');
+is($feat->display_name,'Retinoblastoma-associated protein, B-box', 'display_name()');
 
-ok($seq = $a_in->next_seq());
-is(scalar( $seq->get_SeqFeatures() ),40);
+ok($seq = $a_in->next_seq(), 'seq object is defined');
+is(scalar( $seq->get_SeqFeatures() ),40, 'right number of SeqFeatures');
 
-ok(!($seq = $a_in->next_seq()));
+ok(!($seq = $a_in->next_seq()), 'there is no next_seq (correctly)');
 
 # Bug 1908 (enhancement)
 $t_file = test_input_file('interpro_ebi.xml');
@@ -42,18 +42,18 @@
 									 -verbose => $verbose,
 									 -format => 'interpro');
 $seq = $b_in->next_seq();
-ok($seq);
+ok($seq, 'bug 1908');
 
 my @features = $seq->get_SeqFeatures;
-is scalar @features,2;
-is $features[0]->primary_tag, 'region';
-is $features[0]->display_name,'Protein of unknown function DUF1021';
-is $features[0]->location->end,78;
+is(scalar @features, 2, 'right number of SeqFeatures');
+is($features[0]->primary_tag, 'region', 'primary_tag()');
+is($features[0]->display_name, 'Protein of unknown function DUF1021', 'display_name()');
+is($features[0]->location->end, 78, 'location->end()');
 
 my @dblinks = $features[0]->annotation->get_Annotations('dblink');
-is (scalar @dblinks,3);
-is $dblinks[1]->primary_id,'IPR009366';
-is $dblinks[2]->primary_id,'PF06257.1';
+is(scalar @dblinks, 3, 'right number of dblinks');
+is($dblinks[1]->primary_id, 'IPR009366', 'first primary_id');
+is($dblinks[2]->primary_id, 'PF06257.1', 'second primary_id');
 
 my $other_t_file = test_input_file('test.interpro-go.xml');
 my $ipr_in = Bio::SeqIO->new( -file => $other_t_file,
@@ -63,6 +63,6 @@
 $seq = $ipr_in->next_seq();
 @features = $seq->get_SeqFeatures;
 @dblinks = $features[0]->annotation->get_Annotations('dblink');
-is (scalar @dblinks, 4);
-is $dblinks[3]->primary_id,'GO:0003677';
+is(scalar @dblinks, 4, 'right number of dblinks');
+is($dblinks[3]->primary_id, 'GO:0003677', 'primary_id via dblinks');
 




More information about the Bioperl-guts-l mailing list