| 1 | package Bio::GMOD::Blast::Graph::MapDefs; | ||
| 2 | BEGIN { | ||
| 3 | $Bio::GMOD::Blast::Graph::MapDefs::AUTHORITY = 'cpan:RBUELS'; | ||
| 4 | } | ||
| 5 | BEGIN { | ||
| 6 | $Bio::GMOD::Blast::Graph::MapDefs::VERSION = '0.06'; | ||
| 7 | } | ||
| 8 | ##################################################################### | ||
| 9 | # | ||
| 10 | # Cared for by Shuai Weng <shuai@genome.stanford.edu> | ||
| 11 | # | ||
| 12 | # Originally created by John Slenk <jces@genome.stanford.edu> | ||
| 13 | # | ||
| 14 | # You may distribute this module under the same terms as perl itself | ||
| 15 | #----------------------------------------------------------------- | ||
| 16 | |||
| 17 | require Exporter; | ||
| 18 | @ISA = qw( Exporter ); | ||
| 19 | @EXPORT_OK = | ||
| 20 | qw( $imgWidth $imgHeight $fontWidth $fontHeight $imgTopBorder | ||
| 21 | $imgBottomBorder $imgLeftBorder $imgRightBorder $namesHorizBorder | ||
| 22 | $imgHorizBorder $imgVertBorder $arrowHeight $halfArrowHeight | ||
| 23 | $arrowWidth $halfArrowWidth $hspPosInit $hspArrowPad $hspHeight | ||
| 24 | $formFieldWidth $tickHeight $bottomDataOffset $topDataOffset | ||
| 25 | $kNumberOfPartitions $bucketBest $bucketZeroMax $bucketOneMax | ||
| 26 | $bucketTwoMax $bucketThreeMax $bucketFourMax ); | ||
| 27 | |||
| 28 | $imgWidth = 600; | ||
| 29 | $imgHeight = 300; | ||
| 30 | |||
| 31 | # [[ if GD changes it's small font these are screwed. ]] | ||
| 32 | $fontWidth = 6; | ||
| 33 | $fontHeight = 10; | ||
| 34 | |||
| 35 | $imgTopBorder = 25; # will be blank. | ||
| 36 | $imgBottomBorder = $fontHeight*2; # room for key. | ||
| 37 | $imgLeftBorder = 15; # will be blank. | ||
| 38 | $imgRightBorder = 40; # will contain "counts shown / counts in box". | ||
| 39 | $namesHorizBorder = 150; # for extra annotations. | ||
| 40 | |||
| 41 | # aliases. | ||
| 42 | $imgHorizBorder = $imgLeftBorder + $imgRightBorder; | ||
| 43 | $imgVertBorder = $imgTopBorder + $imgBottomBorder; | ||
| 44 | |||
| 45 | # to position the query within the top border. | ||
| 46 | $topDataOffset = 18; | ||
| 47 | |||
| 48 | # make room between hits and key at bottom. | ||
| 49 | $bottomDataOffset = 2; | ||
| 50 | |||
| 51 | $tickHeight = 2; | ||
| 52 | |||
| 53 | # graphical arrow height is actually +1; | ||
| 54 | # we take a central point and draw the | ||
| 55 | # arrow +/- $arrowHeight/2 around it. | ||
| 56 | $arrowHeight = 6; | ||
| 57 | |||
| 58 | $halfArrowHeight = int($arrowHeight/2); | ||
| 59 | # the arrowWidth is for the arrow's end bevels. | ||
| 60 | $arrowWidth = $halfArrowHeight; | ||
| 61 | $halfArrowWidth = int($arrowWidth/2); | ||
| 62 | |||
| 63 | # where we draw the first hit. | ||
| 64 | $hspPosInit = $imgTopBorder; | ||
| 65 | |||
| 66 | # space between hsp rows. | ||
| 67 | $hspArrowPad = 2; | ||
| 68 | |||
| 69 | # how many pixels per hsp row. | ||
| 70 | # +1 because of notes above re: arrow height. | ||
| 71 | $hspHeight = ($arrowHeight+1) + ($hspArrowPad*2); | ||
| 72 | |||
| 73 | # fixed ranges for the buckets. | ||
| 74 | # bucket zero has the best hits. | ||
| 75 | # bucket five has the worst hits. | ||
| 76 | $kNumberOfPartitions = 5; | ||
| 77 | |||
| 78 | $bucketBest = 0; | ||
| 79 | $bucketZeroMax = 1.0e-200; | ||
| 80 | $bucketOneMax = 1e-100; | ||
| 81 | $bucketTwoMax = 1e-50; | ||
| 82 | $bucketThreeMax = 1e-10; | ||
| 83 | $bucketFourMax = 1.0; | ||
| 84 | |||
| 85 | __END__ |