31
29
use vars qw($DEBUG);
32
30
$DEBUG = $ENV{'BIOPERLDEBUG'} || -1;
32
if( $^O =~ /mswin/i ) {
33
for ( $Test::ntest..$TESTCOUNT ) {
34
skip("Cannot run consed module on windows",1,1);
34
38
print("Checking if the Bio::Tools::Alignment::Consed module could be used...\n") if $DEBUG > 0;
83
87
print("Checking if the number of singletons can be retrieved and if that number is correct (3)...\n") if($DEBUG > 0);
84
88
@singletons = $o_consed->get_singletons();
85
89
ok (scalar(@singletons), 3);
87
print("Finding out, via grep, how many sequences there are in the acefile _and_ in the singlets file...\n") if($DEBUG > 0);
88
$invoker = $o_consed->count_sequences_with_grep();
89
my $total_grep_sequences = $invoker;
90
print("($total_grep_sequences)\n")if($DEBUG > 0) ;
90
my($total_object_sequences, $total_grep_sequences);
91
print("Finding out, via grep, how many sequences there are in the acefile _and_ in the singlets file...\n") if $DEBUG > 0;
92
ok($total_grep_sequences = $o_consed->count_sequences_with_grep(), 179);
92
94
print("Getting the statistics from the Bio::Tools::Alignment::Consed object to compare the total number of sequences accounted for there to the number of sequences found via grep...\n") if($DEBUG > 0);
93
$invoker = $o_consed->sum_lets("total_only");
94
my $total_object_sequences = $invoker;
95
$total_object_sequences =~ s/.*,//;
96
print("($total_object_sequences)\n") if($DEBUG > 0) ;
95
ok($total_object_sequences = $o_consed->sum_lets("total_only"),179);
97
96
print("Match?\n") if($DEBUG > 0) ;
98
97
ok ($total_object_sequences, $total_grep_sequences);
100
99
print("These are the statistics. Look right? ".$o_consed->sum_lets()."\n") if($DEBUG > 0);
100
ok($o_consed->sum_lets(),'Singt/singn/doub/pair/mult/total : 65,3,45(90),1(2),4(19),179');
103
102
print("Dumping out the hash in a compact way...\n")if($DEBUG > 0) ;
104
$o_consed->dump_hash_compact()if($DEBUG > 0) ;
103
$o_consed->dump_hash_compact() if($DEBUG > 0) ;
106
105
# print("Dumping out the hash in an ugly way...\n");
107
106
# $o_consed->dump_hash();