[Bio] / FigKernelPackages / display_related_genomes.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/display_related_genomes.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Sun Apr 8 21:36:16 2007 UTC revision 1.2, Sun Aug 15 20:10:00 2010 UTC
# Line 6  Line 6 
6    
7  #  Use FIGjs.pm if available:  #  Use FIGjs.pm if available:
8    
9  my $have_FIGjs = eval { require FIGjs; 1 };  my $have_FIGjs;
10    eval { require FIGjs; $have_FIGjs = 1; };
11    
12  my @clrkey  = qw( 1 2 3 4 5 6 7 );  my @clrkey  = qw( 1 2 3 4 5 6 7 );
13  my $lastkey = 0;  my $lastkey = 0;
# Line 27  Line 28 
28  #     peg_entry       = [ contig, gene, peg_len, mouseover, related_entries ]  #     peg_entry       = [ contig, gene, peg_len, mouseover, related_entries ]
29  #     related_engties = [ related_entry, ... ]  #     related_engties = [ related_entry, ... ]
30  #     related_entry   = [ type, contig, gene, indentity_frac, mouseover ]  #     related_entry   = [ type, contig, gene, indentity_frac, mouseover ]
31  #     type            = <-> | -> | -  #     type            = <-> | -> | -    (bbh, best hit, or no hit)
32  #     mouseover       = [ pop_up_title_html, pop_up_body_html, href_url ];  #     mouseover       = [ pop_up_title_html, pop_up_body_html, href_url ];
33  #  #
34  #     headings        = [ heading, ... ] = column heading information  #     headings        = [ heading, ... ] = column heading information
# Line 37  Line 38 
38  #  #
39  #     color_by   => keyword    -- color matching entries by identity or contig  #     color_by   => keyword    -- color matching entries by identity or contig
40  #     breakcolor => html_color -- color of genome separator (D = #dddddd)  #     breakcolor => html_color -- color of genome separator (D = #dddddd)
41  #     breakwidth => points     -- width of genome separator (D = 5)  #     breakwidth => points     -- width of genome separator (D = 3)
42  #     page       => boolean    -- 0 for invoking from CGI; 1 gives HTML page  #     page       => boolean    -- 0 for invoking from CGI; 1 gives HTML page
43    #
44  #===============================================================================  #===============================================================================
45  sub display_related_genomes  sub display_related_genomes
46  {  {
47      my ( $contig_entries, $headings, $options ) = @_;      my ( $contig_entries, $headings, $options ) = @_;
48      ref ( $contig_entries ) eq 'ARRAY' && ref( $headings ) eq 'ARRAY'      $contig_entries && ref ( $contig_entries ) eq 'ARRAY' && $headings && ref( $headings ) eq 'ARRAY'
49          or print STDERR "display_related_genomes requires contig_entries and headings\n"          or print STDERR "display_related_genomes requires contig_entries and headings\n"
50          and return '';          and return '';
51      $options ||= {};      $options ||= {};
# Line 257  Line 259 
259  sub linked_datum  sub linked_datum
260  {  {
261      my ( $datum, $color, $mouse ) = @_;      my ( $datum, $color, $mouse ) = @_;
262      my ( $id, $text, $link ) = ( ref( $mouse ) eq 'ARRAY' ) ? @$mouse : ();      my ( $id, $text, $link ) = ( $mouse && ref( $mouse ) eq 'ARRAY' ) ? @$mouse : ();
263      $mouse = $text  ? mouseover( $id, $text || '&nbsp;' ) : '';      $mouse = $text  ? mouseover( $id, $text || '&nbsp;' ) : '';
264      $link  = $link  ? " HRef=$link Target='$id'"          : '';      $link  = $link  ? " HRef=$link Target='$id'"          : '';
265      $color = $color ? " BgColor=$color"                   : '';      $color = $color ? " BgColor=$color"                   : '';

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3