diff --git a/HMM/Profile.pm b/HMM/Profile.pm index 8f60a9b..bde96ef 100755 --- a/HMM/Profile.pm +++ b/HMM/Profile.pm @@ -882,12 +882,14 @@ sub _parseFile3 { # Match line if ($substate == 0) { - my ($s, $ascii, $map, $consensus, $rf, $cs); + my ($s, $ascii, $map, $consensus, $rf, $mm, $cs); - if ($self->version =~ /[abcd]$/) { + if ($self->version =~ /[abcd]$/) { # hmm versions a..d or greater ($s, $ascii, $map, $rf, $cs) = $line =~ /^\s*(\d+)\s+(.*)\s+(\S+)\s+(\S)\s+(\S)\s*$/; - } else { # hmm version e or greater + } elsif ($self->version =~ /e$/) { # hmm version e ($s, $ascii, $map, $consensus, $rf, $cs) = $line =~ /^\s*(\d+)\s+(.*)\s+(\S+)\s+(\S)\s+(\S)\s+(\S)\s*$/; + } else { # hmm version f or greater + ($s, $ascii, $map, $consensus, $rf, $mm, $cs) = $line =~ /^\s*(\d+)\s+(.*)\s+(\S+)\s+(\S)\s+(\S)\s+(\S)\s+(\S)\s*$/; } diff --git a/scripts/make_profile.pl b/scripts/make_profile.pl index 5635238..69b0632 100755 --- a/scripts/make_profile.pl +++ b/scripts/make_profile.pl @@ -1,5 +1,8 @@ #!/usr/bin/env perl +use FindBin; # locate this script +use lib "$FindBin::Bin/.."; # use the parent directory; this is for HMM::Profile, calling from some other directory + use strict; use warnings; use HMM::Profile; @@ -21,9 +24,6 @@ $logo->print_logo_dimensions( -xsize => $xsize, -ysize => $ysize, - -x_title => 'Relative Entropy', - -y_title => 'Contribution', - -graph_title => $graph_title, -greyscale => $greyscale, -height_logodds => $height_logodds ) or die "Error writing $outfile!\n"; @@ -35,13 +35,13 @@ -file => $outfile, -xsize => $xsize, -ysize => $ysize, - -x_title => 'Relative Entropy', - -y_title => 'Contribution', + -x_title => 'Position', + -y_title => 'Contribution (bits)', -graph_title => $graph_title, -greyscale => $greyscale, -height_logodds => $height_logodds ) or die "Error writing $outfile!\n"; -my $data = $logo->flatten($height_logodds); +#my $data = $logo->flatten($height_logodds); #print STDOUT p( $data); print STDOUT "Finished drawing Logo...\n";