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

Diff of /FigWebServices/protein.cgi

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

revision 1.172, Fri Dec 23 18:13:45 2005 UTC revision 1.173, Wed Jan 4 04:46:12 2006 UTC
# Line 144  Line 144 
144          elsif ($request eq "view_all_annotations")   { &view_all_annotations($fig_or_sprout,$cgi,$html,$prot); }          elsif ($request eq "view_all_annotations")   { &view_all_annotations($fig_or_sprout,$cgi,$html,$prot); }
145          elsif ($request eq "aa_sequence")            { &aa_sequence($fig_or_sprout,$cgi,$html,$prot);  }          elsif ($request eq "aa_sequence")            { &aa_sequence($fig_or_sprout,$cgi,$html,$prot);  }
146          elsif ($request eq "dna_sequence")           { &dna_sequence($fig_or_sprout,$cgi,$html,$prot); }          elsif ($request eq "dna_sequence")           { &dna_sequence($fig_or_sprout,$cgi,$html,$prot); }
147            elsif ($request eq "dna_sequence_adjacent")  { &dna_sequence_adjacent($fig_or_sprout,$cgi,$html,$prot); }
148          elsif ($request eq "fast_assign")            { $html = &make_assignment($fig_or_sprout,$cgi,$html,$prot); }          elsif ($request eq "fast_assign")            { $html = &make_assignment($fig_or_sprout,$cgi,$html,$prot); }
149          elsif ($request eq "show_coupling_evidence") { &show_coupling_evidence($fig_or_sprout,$cgi,$html,$prot); }          elsif ($request eq "show_coupling_evidence") { &show_coupling_evidence($fig_or_sprout,$cgi,$html,$prot); }
150          elsif ($request eq "abstract_coupling")      { &show_abstract_coupling_evidence($fig_or_sprout,$cgi,$html,$prot); }          elsif ($request eq "abstract_coupling")      { &show_abstract_coupling_evidence($fig_or_sprout,$cgi,$html,$prot); }
# Line 594  Line 595 
595      push(@$html,"<br><a href=$link>Protein Sequence</a>\n");      push(@$html,"<br><a href=$link>Protein Sequence</a>\n");
596    
597      $link = $cgi->url(-relative => 1, -query => 1, -path_info => 1) . "&request=dna_sequence";      $link = $cgi->url(-relative => 1, -query => 1, -path_info => 1) . "&request=dna_sequence";
598      push(@$html,"<br><a href=$link>DNA Sequence</a><br>\n");      push(@$html,"<br><a href=$link>DNA Sequence</a>\n");
599        $link = $cgi->url(-relative => 1, -query => 1, -path_info => 1) . "&request=dna_sequence_adjacent";
600        push(@$html," [<a href=$link>with flanking sequence</a>]<br>\n");
601    
602      $link = $cgi->url(-relative => 1);      $link = $cgi->url(-relative => 1);
603      $link =~ s/protein.cgi/fid_checked.cgi/;      $link =~ s/protein.cgi/fid_checked.cgi/;
# Line 2347  Line 2350 
2350      }      }
2351  }  }
2352    
2353    # RAE: Added this routine to get the adjacent sequence. The default is to get 500 bp on either side of the
2354    # gene, but you can (secretly) change this to get more or less sequence by setting additional_sequence
2355    # in the URL. Also, I changed the way that the display is generated above so that I can used the s///
2356    # to add the color and new lines.
2357    
2358    sub dna_sequence_adjacent {
2359        my($fig_or_sprout,$cgi,$html,$fid) = @_;
2360        my($seq,$func,$i);
2361    
2362        unshift @$html, "<TITLE>The SEED: Nucleotide Sequence</TITLE>\n";
2363        my $additional=$cgi->param("additional_sequence");
2364        $additional or ($additional = 500);
2365        # dna_sequence makes the assumption that there is only one sequence region
2366        &feature_locationS($fig_or_sprout,$fid) =~ /(.*)\_(\d+)\_(\d+)/;
2367        my ($id, $beg, $end)=($1,$2,$3);
2368        ($beg < $end) ? eval {$beg -= $additional; $end += $additional} : eval {$beg += $additional; $end -= $additional};
2369    
2370        if ($seq = &dna_seq($fig_or_sprout,&genome_of($fid),$id."_".$beg."_".$end)) {
2371            $seq =~ s/(.{60})/$1\n/g;
2372            $additional += int($additional/60);
2373            $seq =~ s/^(.{$additional})(.*)(.{$additional})$/$1<span style="color: red">$2<\/span>$3/s;
2374            $func = &function_ofS($fig_or_sprout,$prot,$cgi->param('user'));
2375            push(@$html,$cgi->pre,">$fid $func\n$seq\n",$cgi->end_pre);
2376        } else {
2377            push(@$html,$cgi->h1("No DNA sequence available for $fid"));
2378        }
2379    }
2380    
2381  sub show_fusions {  sub show_fusions {
2382      my($fig_or_sprout,$cgi,$html,$prot) = @_;      my($fig_or_sprout,$cgi,$html,$prot) = @_;
2383    

Legend:
Removed from v.1.172  
changed lines
  Added in v.1.173

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3