Skip to content

Commit

Permalink
Restored strict and warnings pragmas to modules
Browse files Browse the repository at this point in the history
There were a number of modules where the strict and warnings pragmas
had been removed. I restored these and fixed the warning message in
HMM/Profile (caused by PDL returning the string 'BAD' instead
of a number) by checking the string to make sure it is numeric, before
testing it.
  • Loading branch information
neomorphic committed Jan 23, 2012
1 parent afe982f commit d4893bb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions HMM.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ it: L<PDL>.
package HMM;

use strict;
use warnings;
use PDL::LiteF;

our $VERSION = '0.81';
Expand Down
1 change: 1 addition & 0 deletions HMM/Alignment.pm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ a graphical representation of the alignment. It is an extension of the HMM Logo
package HMM::Alignment;

use strict;
use warnings;
use vars '@ISA'; #inheritance
use PDL::LiteF;
use Imager ':handy';
Expand Down
3 changes: 1 addition & 2 deletions HMM/Profile.pm
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,11 @@ sub draw_logo {
#get all the values for one column from the matrix
my @infValues = list $ICM->slice($k);


my $l=0;

#fill infContent-Hash with Values
foreach my $key (@alphabet){
unless(($infValues[$l]*$yStep)<1){ # if the character would print lower than 1 pixel, discard it
if( $infValues[$l] !~ /^BAD$/ && ($infValues[$l] * $yStep) > 1){ # if the character would print lower than 1 pixel, discard it
$infContent{$key} = sprintf('%.16f', $infValues[$l]);
}
++$l; # this is the index of the information-content of the next character in the infValues vector
Expand Down
7 changes: 4 additions & 3 deletions HMM/Utilities3.pm
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package HMM::Utilities3;
use vars qw(@ISA @EXPORTER @EXPORT_OK);
use strict;
use warnings;
use Exporter;
@ISA = qw(Exporter);
@EXPORT = ();
our @ISA = qw(Exporter);
our @EXPORT = ();

use PDL::LiteF;

Expand Down
4 changes: 2 additions & 2 deletions make_profile.pl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
my $xsize = $logo->length() * 34;
my $greyscale = 0;

if (0==1) {
=for comment
$logo->print_logo_dimensions(
-xsize => $xsize,
-ysize => $ysize,
Expand All @@ -27,7 +27,7 @@
-greyscale => $greyscale,
-height_logodds => $height_logodds
) or die "Error writing $outfile!\n";
}
=cut

#Now go and make the logos
print STDOUT "Drawing Logo...\n";
Expand Down

0 comments on commit d4893bb

Please sign in to comment.