DaGaMs/Logomat — pull request #1 by traviswheeler (2012-01-20 21:17:48+00:00)
Title: new log-odds-based letter heights, and more

Ben -

Figuring that it may make your life easier to just commit working copies of the relevant files (instead of making you find versions that work), I've done that here. If you don't want to accept them, and would prefer to have me work the changes into some other working version, say the word. These seem to work just fine.

Here was the commit message:

alternate method of splitting column heights. The default is still
the old way of using emission probabilities; the new way is to use
log odds scores, and only let positive-scoring residues play a part
in the column. This is acheived by adding the '--height_logodds 1'
flag to a call to draw_logo.

Implemented a fix to let HMM-Logo read newer formats from HMMER's
hmmbuild, as the new format 3/e caused crashes in the old '_parseFile3'
function.

Implements a new function 'print_logo_dimensions' that works like
'draw_logo', but instead of creating a png, it prints out the dimensions
of each HMM position (insert widths, and residue height/widths). This
is a cleaner format than the 'flat' output, and will enable post-
processing of those dimensions.

pulls the "foreach my $key (@drawOrder){" block of code in 'draw_logo'
into the 'else' case, to avoid the occasional bug of printing residue
stacks inside the insert columns.

make_profile.pl is added in order to provide an example for using the
above changes. (I chose not to modify hmm2logo.pl, but wouldn't mind
if changes from make_profile.pl were placed into hmm2logo.pl, then
make_profile was removed).