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

Diff of /FigWebServices/figfam_proto.cgi

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

revision 1.4, Thu May 24 20:09:42 2007 UTC revision 1.5, Thu May 24 20:54:25 2007 UTC
# Line 16  Line 16 
16  my $inputs;  my $inputs;
17  if ($cgi->param('request') )  if ($cgi->param('request') )
18  {  {
19    my $input =$cgi->param('proteins');    my $input =$cgi->param('set_of_pegs');
20    my @inputs = split("\n",$input);    my @inputs = split("\n",$input);
21    
22    if ($cgi->upload('fileupload'))    if ($cgi->upload('fileupload'))
# Line 83  Line 83 
83      "<h3>Pegs with $query_domain Not in $figfam_id</h3>",      "<h3>Pegs with $query_domain Not in $figfam_id</h3>",
84      "<table border><tr><td>PEG</td><td>FUNCTION</td></tr>";      "<table border><tr><td>PEG</td><td>FUNCTION</td></tr>";
85      my $count = scalar(@returns);      my $count = scalar(@returns);
86      print STDERR "count:$count\n";      #print STDERR "count:$count\n";
87      foreach my $return (@returns){      foreach my $return (@returns){
88          my $peg = @$return[0];          my $peg = @$return[0];
89          print STDERR "peg:$peg\n";          #print STDERR "peg:$peg\n";
90          if(!$in_family{$peg}){          if(!$in_family{$peg}){
91              #print STDERR "peg:$peg\n";              #print STDERR "peg:$peg\n";
92              my $function = $fig->function_of($peg);              my $function = $fig->function_of($peg);
# Line 104  Line 104 
104  sub analyze_domains  sub analyze_domains
105  {  {
106      my ($cgi,$fig,$given) =@_;      my ($cgi,$fig,$given) =@_;
107        my ($figfam_id,$figfam,$function,$set,$count);
108    
109        if ($cgi->param('figfam_id')){
110            $figfam_id = $cgi->param('figfam_id');
111            $figfam = FigFam->new($fig,$figfam_id);
112            $function = $figfam->family_function();
113            $set = $figfam->pegs_of();
114        }
115    
116        else{
117            my @temp = ();
118            foreach $g (@$given){
119                if($g=~/(fig\|\d+.\d.peg.\d+)/){push(@temp,$1)}
120            }
121            $set = [@temp];
122            $figfam_id = "Arbitrary Set";
123            $function = "Mixed Set";
124        }
125        $count = scalar(@$set);
126    
     my $sops = $cgi->param('set_of_pegs');  
     my $figfam_id = $cgi->param('figfam_id');  
     my $figfam = FigFam->new($fig,$figfam_id);  
     my $function = $figfam->family_function();  
127      my %peg_to_domain;      my %peg_to_domain;
128      my %peg_to_score;      my %peg_to_score;
129      my %domain;      my %domain;
# Line 123  Line 138 
138          my $domain = $parts[0];          my $domain = $parts[0];
139          my $prob = $parts[1];          my $prob = $parts[1];
140          $prob{$domain} = $prob;          $prob{$domain} = $prob;
         #print STDERR "prob:$domain $prob";  
141      }      }
142      close(PROB);      close(PROB);
143    
# Line 136  Line 150 
150      }      }
151      close(IN);      close(IN);
152    
     my $set = $figfam->pegs_of();  
     my  $count = scalar(@$set);  
   
153      push @$html,      push @$html,
154      "<h3>Domain Analysis Results for $count pegs in $figfam_id</h3>",      "<h3>Domain Analysis Results for $count pegs in $figfam_id</h3>",
155      "<h3>Family Function: $function</h3>",      "<h3>Family Function: $function</h3>",
156      "<br>";      "<br>";
157    
   
158      my @databases = ('CDD','PIR','PROSITE','PRODOM');      my @databases = ('CDD','PIR','PROSITE','PRODOM');
159      if($figfam_id){      if($count > 0){
160            #print STDERR "some in set\n";
161          foreach my $db (@databases){          foreach my $db (@databases){
162              foreach $key (keys(%peg_to_score)){delete($peg_to_score{$key})}              foreach $key (keys(%peg_to_score)){delete($peg_to_score{$key})}
163              foreach $key (keys(%peg_to_domain)){delete($peg_to_domain{$key})}              foreach $key (keys(%peg_to_domain)){delete($peg_to_domain{$key})}

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3