From: Ben F. <fag...@gm...> - 2008-09-23 15:29:42
|
Hello everyone, It has come to my attention that there is a bug when CMap displays negative numbers on the map tick marks. This bug has existed in the code since the 0.13 release (I don't know how it has slipped by this long). Note: This bug only affects maps that have a negative start value. The bug causes negative numbers on the tick marks to be off by one (in the last significant digit. For example: -30 -20 -10 0 10 | | | | | ---------------------------- Is being displayed as: -20 -10 0 0 10 | | | | | ---------------------------- I have attached a patch that will work with versions 0.15 to the current release. To apply the patch, find the Bio/GMOD/CMap/Utils.pm file and patch it like so: $ patch Bio/GMOD/CMap/Utils.pm Utils.080923.v1.01.patch This should fix the problem. If you are using versions 0.13 or 0.14, then you will have to make the patch by hand. Simply open the Bio/GMOD/CMap/Utils.pm file. Find the "presentable_number" subroutine and replace the line: my $rounded_temp = int( ( $num / ( 10**$rounding_power ) ) + .5 ); with: my $half = ($num >= 0)? 0.5: -0.5; my $rounded_temp = int( ( $num / ( 10**$rounding_power ) ) + $half ); I'm sorry for the inconvenience. My thanks goes to David Hane for reporting this bug. Ben |