From 090a58fe4ce54db906cc24f075704c0788b04570 Mon Sep 17 00:00:00 2001 From: Travis Wheeler Date: Thu, 22 Mar 2012 10:11:34 -0400 Subject: [PATCH 1/3] Changing the axis labels in the make_profile.pl script Adding code to handle the HMMER3/f format (which will eventually see the light of day in H3.1 release) --- HMM/Profile.pm | 8 +++++--- make_profile.pl | 9 +++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/HMM/Profile.pm b/HMM/Profile.pm index cf33dc9..10f24a9 100755 --- a/HMM/Profile.pm +++ b/HMM/Profile.pm @@ -872,12 +872,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/make_profile.pl b/make_profile.pl index f0b2c8d..09faf75 100755 --- a/make_profile.pl +++ b/make_profile.pl @@ -21,9 +21,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 +32,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->flat($height_logodds); +#my $data = $logo->flat($height_logodds); #print STDOUT p( $data); print STDOUT "Finished drawing Logo...\n"; From c2172e9e16f7e38e087b3500dec55eef632ebcd5 Mon Sep 17 00:00:00 2001 From: Travis Wheeler Date: Wed, 26 Sep 2012 13:28:12 -0400 Subject: [PATCH 2/3] Merge branch 'master' of https://github.com/DaGaMs/Logomat Conflicts: scripts/make_profile.pl From 75951391f021e2bb31983815144a217312fcd7d2 Mon Sep 17 00:00:00 2001 From: Travis Wheeler Date: Wed, 26 Sep 2012 13:29:48 -0400 Subject: [PATCH 3/3] Added FindBin module, to allow make_profile to be called from other directories --- scripts/make_profile.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/make_profile.pl b/scripts/make_profile.pl index 57936bd..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;