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
Expand Up @@ -26,6 +26,7 @@ it: L<PDL>.
package HMM; package HMM;


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


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


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



my $l=0; my $l=0;


#fill infContent-Hash with Values #fill infContent-Hash with Values
foreach my $key (@alphabet){ 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]); $infContent{$key} = sprintf('%.16f', $infValues[$l]);
} }
++$l; # this is the index of the information-content of the next character in the infValues vector ++$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
@@ -1,8 +1,9 @@
package HMM::Utilities3; package HMM::Utilities3;
use vars qw(@ISA @EXPORTER @EXPORT_OK); use strict;
use warnings;
use Exporter; use Exporter;
@ISA = qw(Exporter); our @ISA = qw(Exporter);
@EXPORT = (); our @EXPORT = ();


use PDL::LiteF; use PDL::LiteF;


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


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


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

0 comments on commit d4893bb

Please sign in to comment.