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

Diff of /FigWebServices/subsys.cgi

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

revision 1.76, Tue May 10 12:03:39 2005 UTC revision 1.77, Thu Jun 9 16:33:41 2005 UTC
# Line 410  Line 410 
410              $subsystem->write_subsystem();              $subsystem->write_subsystem();
411          }          }
412    
   
413          my $col;          my $col;
414          if (($col = $cgi->param('col_to_align')) && ($col =~ /^\s*(\d+)\s*$/))          if ($cgi->param('show_sequences_in_column') &&
415                ($col = $cgi->param('col_to_align')) &&
416                ($col =~ /^\s*(\d+)\s*$/))
417            {
418                &show_sequences_in_column($fig,$cgi,$html,$subsystem,$col);
419            }
420            else
421          {          {
422              &align_column($fig,$cgi,$html,$1,$subsystem);              if ($cgi->param('align_column') &&
423                    ($col = $cgi->param('col_to_align')) && ($col =~ /^\s*(\d+)\s*$/))
424                {
425                    my $col = $1;
426                    &align_column($fig,$cgi,$html,$col,$subsystem);
427              $cgi->delete('col_to_align');              $cgi->delete('col_to_align');
428          }          }
429          elsif (($col = $cgi->param('subcol_to_realign')) && ($col =~ /^\s*(\d+)\.(\d+)\s*$/))              elsif ($cgi->param('realign_column') &&
430                       ($col = $cgi->param('subcol_to_realign')) && ($col =~ /^\s*(\d+)\.(\d+)\s*$/))
431          {          {
432              &align_subcolumn($fig,$cgi,$html,$1,$2,$subsystem);              &align_subcolumn($fig,$cgi,$html,$1,$2,$subsystem);
433              $cgi->delete('subcol_to_realign');              $cgi->delete('subcol_to_realign');
# Line 425  Line 435 
435          &produce_html_to_display_subsystem($fig,$subsystem,$cgi,$html,$ssa);          &produce_html_to_display_subsystem($fig,$subsystem,$cgi,$html,$ssa);
436      }      }
437  }  }
438    }
439    
440  sub handle_role_and_subset_changes {  sub handle_role_and_subset_changes {
441      my($fig,$subsystem,$cgi,$html) = @_;      my($fig,$subsystem,$cgi,$html) = @_;
# Line 822  Line 833 
833      # RAE Hide -1 variants      # RAE Hide -1 variants
834      push(@$html,$cgi->checkbox(-name => 'hide_minus1', -value=> 1, -checked => 0, -label => 'hide -1 variants'),$cgi->br);      push(@$html,$cgi->checkbox(-name => 'hide_minus1', -value=> 1, -checked => 0, -label => 'hide -1 variants'),$cgi->br);
835      push(@$html,$cgi->hr,      push(@$html,$cgi->hr,
836                  $cgi->br,"Align column (specify the number of the column): ",                  $cgi->br,"Column (specify the number of the column): ",
837                  $cgi->textfield(-name => "col_to_align", -size => 7),                  $cgi->textfield(-name => "col_to_align", -size => 7),
838                    $cgi->br,
839                    $cgi->submit(-value => "Just show Sequences in Column",
840                                 -name => "show_sequences_in_column"),
841                    $cgi->br,
842                    $cgi->submit(-value => "Align Column",
843                                 -name => "align_column"),
844                    $cgi->br,
845                  $cgi->br,"Realign subgroup within a column (adding homologs): ",                  $cgi->br,"Realign subgroup within a column (adding homologs): ",
846                  $cgi->textfield(-name => "subcol_to_realign", -size => 7),                  $cgi->textfield(-name => "subcol_to_realign", -size => 7),
847                  $cgi->br,"Include homologs that pass the following threshhold: ",                  $cgi->br,"Include homologs that pass the following threshhold: ",
848                  $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)",
849                  " Max homologous seqs: ",$cgi->textfield(-name => "max_homo", -value => 100, -size => 6),                  " Max homologous seqs: ",$cgi->textfield(-name => "max_homo", -value => 100, -size => 6),
850                    $cgi->br,
851                    $cgi->submit(-value => "Realign Column",
852                                 -name => "realign_column"),
853                  $cgi->hr                  $cgi->hr
854               );               );
855    
# Line 2579  Line 2600 
2600          }          }
2601    
2602          &FIG::run("$FIG_Config::bin/split_and_trim_sequences \"$dir/split_info\" < $tmpF");          &FIG::run("$FIG_Config::bin/split_and_trim_sequences \"$dir/split_info\" < $tmpF");
         unlink($tmpF);  
2603    
2604          if (-s "$dir/split_info/set.sizes")          if (-s "$dir/split_info/set.sizes")
2605          {          {
# Line 2950  Line 2970 
2970      }      }
2971      close(TMP);      close(TMP);
2972  }  }
2973    
2974    sub show_sequences_in_column {
2975        my($fig,$cgi,$html,$subsystem,$colN) = @_;
2976        my(@pegs,$role);
2977    
2978        my $roles = [$subsystem->get_roles];
2979        if (($role = &which_role_for_column($colN,$roles)) &&
2980            ((@pegs = &seqs_to_align($role,$subsystem)) > 0))
2981        {
2982            push(@$html, "<pre>\n");
2983            foreach my $peg (@pegs)
2984            {
2985                my $seq;
2986                if ($seq = $fig->get_translation($peg))
2987                {
2988                    push(@$html,  ">$peg\n$seq\n");
2989                }
2990                else
2991                {
2992                    push(@$html, "could not find translation for $peg\n");
2993                }
2994            }
2995            push(@$html, "\n</pre>\n");
2996        }
2997        else
2998        {
2999            push(@$html,$cgi->h1("Could not determine the role from $colN"));
3000        }
3001    }
3002    

Legend:
Removed from v.1.76  
changed lines
  Added in v.1.77

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3