[Bio] / FigWebServices / genomebrowser.cgi Repository:
ViewVC logotype

Diff of /FigWebServices/genomebrowser.cgi

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

revision 1.4, Fri Feb 4 00:38:17 2005 UTC revision 1.5, Fri Feb 4 06:59:46 2005 UTC
# Line 45  Line 45 
45  my $user = $cgi->param('user');  my $user = $cgi->param('user');
46  my $err;  my $err;
47    
48    
49    foreach (@ARGV) {
50     my ($k, $v)=split /\=/;
51     if ($k eq "compare_to") {my @arr=split /\,/, $v; $v=\@arr}
52     $cgi->param(-name=>$k, -value=>$v);
53    }
54    
55  if ($cgi->param('genome')) {  if ($cgi->param('genome')) {
56   # draw the image   # draw the image
57   unshift @$html, "<TITLE>The SEED - Genome Browser </TITLE>\n";   unshift @$html, "<TITLE>The SEED - Genome Browser </TITLE>\n";
58    
59   my %imagefns;   my %imagefns;
60   foreach my $kw   foreach my $kw
61    (qw[width margin top_marg bottom_marg box_height rows box_no_score box_score show_function tick_mark_height genome_lines abrrev stopshort maxn maxp bluescale stopshort])    (qw[width margin top_marg bottom_marg box_height rows box_no_score box_score show_function tick_mark_height genome_lines abbrev stopshort
62      maxn maxp bluescale stopshort user])
63   {   {
64    $imagefns{"-".$kw}=$cgi->param($kw);    $imagefns{"-".$kw}=$cgi->param($kw);
65   }   }
# Line 63  Line 71 
71    $ct =~ /\((\d+\.\d+)\)/;    $ct =~ /\((\d+\.\d+)\)/;
72    push @{$imagefns{'-compare_to'}}, $1;    push @{$imagefns{'-compare_to'}}, $1;
73   }   }
74     if ($cgi->param('subsystems')) {push @{$imagefns{'-compare_to'}}, "subsystems"}
75   if ($cgi->param('pirsf')) {push @{$imagefns{'-compare_to'}}, ['tagvalue', 'pirsf']}   if ($cgi->param('pirsf')) {push @{$imagefns{'-compare_to'}}, ['tagvalue', 'pirsf']}
76   #   #
77   # remember that we also need to pass in scalefactor here if we have one. This should be a tuple of 'pirsf' and the factor   # remember that we also need to pass in scalefactor here if we have one. This should be a tuple of 'pirsf' and the factor
78    
79     if ($ARGV[0]) {
80      print STDERR "These are the compare to's: \n", join "\n", @{$imagefns{'-compare_to'}}, '';
81     }
82    
83   my $image=raedraw->new(%imagefns);   my $image=raedraw->new(%imagefns);
84    
# Line 77  Line 89 
89    
90   my ($width, $height)=$image->write_image($filename);   my ($width, $height)=$image->write_image($filename);
91    
92    
93   push @$html, $cgi->div({class=>"image"}, $cgi->object({class=>"genomebrowser", data=>"$url", width=>"$width", height=>"$height",   push @$html, $cgi->div({class=>"image"}, $cgi->object({class=>"genomebrowser", data=>"$url", width=>"$width", height=>"$height",
94           standby=>"Loading genome browser image, please be patient"},           standby=>"Loading genome browser image, please be patient"},
95           "There should have been an SVG graphic comparing the genomes that you have chosen here, however, you probably need to download ",           "There should have been an SVG graphic comparing the genomes that you have chosen here, however, you probably need to download ",
# Line 91  Line 104 
104   &show_initial($fig,$cgi,$html);   &show_initial($fig,$cgi,$html);
105  }  }
106    
107    push @$err, "Computing this image took " . int((time-$^T)/0.6)/100 . " minutes\n";
108  push @$html, $cgi->div({class=>"errors", style=>"font-size: smaller"}, $cgi->h3("Errors/Diagnoses we caught:"), @$err);  push @$html, $cgi->div({class=>"errors", style=>"font-size: smaller"}, $cgi->h3("Errors/Diagnoses we caught:"), @$err);
109  &HTML::show_page($cgi,$html,1);  &HTML::show_page($cgi,$html,1);
110  exit;  exit;
# Line 123  Line 137 
137     rows         => [10,   'split the image into rows'],     rows         => [10,   'split the image into rows'],
138     show_function=> [3,   'show function every n pegs'],     show_function=> [3,   'show function every n pegs'],
139     tick_mark_height=> [3, 'height of the tick marks on the genome line'],     tick_mark_height=> [3, 'height of the tick marks on the genome line'],
140     maxn         => [50, "Max sims"],     maxn         => [5, "Max sims"],
141     maxp         => [1e-5, "Max E-val"],     maxp         => [1e-5, "Max E-val"],
142     stopshort    => [100, "Stop drawing after some pegs"],     stopshort    => [500, "Stop after drawing this many pegs"],
143   );   );
144    
145   my %checkbox=(   my %checkbox=(
# Line 146  Line 160 
160    
161   push @$html, "\n" , $cgi->p, $cgi->div({class=>"advanced"}, $cgi->table($advanced));   push @$html, "\n" , $cgi->p, $cgi->div({class=>"advanced"}, $cgi->table($advanced));
162    
163     push @$html, $cgi->h3("Subsystems"),  $cgi->table($cgi->Tr(
164      $cgi->td([$cgi->checkbox(-name=>'subsystems', -label=>'') . " &nbsp; highlight PEGs in subsystems"])));
165    
166   # now add the table for tag value pairs:   # now add the table for tag value pairs:
167   push @$html, $cgi->h3("Tag value pairs"), $cgi->table($cgi->Tr(   push @$html, $cgi->h3("Tag value pairs"), $cgi->table($cgi->Tr(
168          $cgi->td([$cgi->checkbox(-name=>'pirsf', -label=>'') . " &nbsp; PIR superfamilies", ''])));          $cgi->td([$cgi->checkbox(-name=>'pirsf', -label=>'') . " &nbsp; PIR superfamilies", ''])));

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3