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

Diff of /FigWebServices/ssa2.cgi

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

revision 1.9, Wed May 19 21:34:23 2004 UTC revision 1.10, Thu May 20 13:38:37 2004 UTC
# Line 52  Line 52 
52  {  {
53      push(@$html,$cgi->h1("Sorry, you need to specify a master user to modify subsystem annotations"));      push(@$html,$cgi->h1("Sorry, you need to specify a master user to modify subsystem annotations"));
54  }  }
55    elsif ($cgi->param("export_align_input"))
56    {
57        print $cgi->header;
58        print "exporting alignment input\n";
59        exit;
60    }
61  else  else
62  {  {
63      $request = defined($request) ? $request : "";      $request = defined($request) ? $request : "";
# Line 435  Line 441 
441      push(@$html,$cgi->checkbox(-name => 'show_coupled', -value => 1, -checked => 0, -override => 1,-label => 'show coupled PEGs[figure 2 minutes per PEG in spreadsheet]'),$cgi->br);      push(@$html,$cgi->checkbox(-name => 'show_coupled', -value => 1, -checked => 0, -override => 1,-label => 'show coupled PEGs[figure 2 minutes per PEG in spreadsheet]'),$cgi->br);
442      push(@$html,$cgi->br,"Align column: ",      push(@$html,$cgi->br,"Align column: ",
443                  $cgi->textfield(-name => "col_to_align", -size => 7),                  $cgi->textfield(-name => "col_to_align", -size => 7),
444                    $cgi->checkbox(-name => "show_align_input",  -checked => 0,
445                                   -label => "show input to alignment tool"),
446                  $cgi->br,"Include homologs that pass the following threshhold: ",                  $cgi->br,"Include homologs that pass the following threshhold: ",
447                  $cgi->textfield(-name => "include_homo", -size => 10)," (leave blank to see just column)",                  $cgi->textfield(-name => "include_homo", -size => 10)," (leave blank to see just column)",
448                  " Max homologous seqs: ",$cgi->textfield(-name => "max_homo", -value => 100, -size => 6),                  " Max homologous seqs: ",$cgi->textfield(-name => "max_homo", -value => 100, -size => 6),
# Line 1678  Line 1686 
1686      print $cgi->pre($_),"\n";      print $cgi->pre($_),"\n";
1687  }  }
1688    
1689    sub export_align_input
1690    {
1691    
1692    }
1693    
1694  sub align_column {  sub align_column {
1695      my($fig,$cgi,$html,$col,$roles,$genomes,$rows,$subsetsR,$active_subsetR) = @_;      my($fig,$cgi,$html,$col,$roles,$genomes,$rows,$subsetsR,$active_subsetR) = @_;
1696      my($colN,@checked,$cutoff);      my($colN,@checked,$cutoff);
1697    
1698      my $subsetR = $subsetsR->{$active_subsetR};      my $subsetR = $subsetsR->{$active_subsetR};
1699    
1700        my $checked;
1701    
1702      if (($colN = &which_column($col,$roles)) &&      if (($colN = &which_column($col,$roles)) &&
1703          ((@checked = &seqs_to_align($colN,$genomes,$rows,$subsetR)) > 1))          ((@checked = &seqs_to_align($colN,$genomes,$rows,$subsetR)) > 1))
1704      {      {
# Line 1693  Line 1708 
1708              $max = $max ? $max : 100;              $max = $max ? $max : 100;
1709              push(@checked,&get_homologs($fig,\@checked,$cutoff,$max));              push(@checked,&get_homologs($fig,\@checked,$cutoff,$max));
1710          }          }
1711          my $checked = join("\' \'",@checked);          $checked = join("\' \'",@checked);
1712        }
1713        else
1714        {
1715            push(@$html,"<h1>You need to check at least two sequences</h1>\n");
1716            return;
1717        }
1718    
1719    
1720        #
1721        # See if we want to produce the alignment, or just produce the
1722        # input to the alignment.
1723        #
1724    
1725        if ($cgi->param("show_align_input"))
1726        {
1727            push(@$html, "<pre>\n");
1728            my $relabel;
1729            foreach my $id (@checked)
1730            {
1731                my $seq;
1732                if ($seq = $fig->get_translation($id))
1733                {
1734                    push(@$html,  ">$id\n$seq\n");
1735                    my $func = $fig->function_of($id);
1736                    $relabel->{$id} = "$id: $func";
1737                }
1738                else
1739                {
1740                    push(@$html, "could not find translation for $id\n");
1741                }
1742            }
1743            push(@$html, "\n</pre>\n");
1744        }
1745        else
1746        {
1747          push(@$html,"<pre>\n");          push(@$html,"<pre>\n");
1748          my %org = map { ( $_, $fig->org_of($_) ) } @checked;          my %org = map { ( $_, $fig->org_of($_) ) } @checked;
1749          #  Modified by GJO to compress tree and add organism names to tree:          #  Modified by GJO to compress tree and add organism names to tree:
# Line 1732  Line 1782 
1782          push(@$html,&set_links($cgi,\@out));          push(@$html,&set_links($cgi,\@out));
1783          push(@$html,"</pre>\n");          push(@$html,"</pre>\n");
1784      }      }
     else  
     {  
         push(@$html,"<h1>You need to check at least two sequences</h1>\n");  
     }  
1785  }  }
1786    
1787  sub which_column {  sub which_column {

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3