[Bio] / FigKernelPackages / Observation.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/Observation.pm

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

revision 1.60, Fri Jun 20 16:08:32 2008 UTC revision 1.65, Thu Aug 7 19:22:46 2008 UTC
# Line 374  Line 374 
374    
375  }  }
376    
377    =head
378        provides layer of abstraction between tools and underlying access method to Attribute Server
379    =cut
380    
381    sub get_attributes{
382        my ($self,$fig,$search_set,$search_term,$value_array_ref) = @_;
383        my @attributes = $fig->get_attributes($search_set,$search_term,@$value_array_ref);
384        return @attributes;
385    }
386    
387  =head3 get_sims_objects()  =head3 get_sims_objects()
388    
389  This is the B<REAL WORKHORSE> method of this Package.  This is the B<REAL WORKHORSE> method of this Package.
# Line 695  Line 705 
705  sub get_sims_observations{  sub get_sims_observations{
706      my ($fid,$datasets_ref,$fig,$parameters) = (@_);      my ($fid,$datasets_ref,$fig,$parameters) = (@_);
707    
708      my ($max_sims, $max_expand, $max_eval, $sim_order, $db_filter);      my ($max_sims, $max_expand, $max_eval, $sim_order, $db_filter, $sim_filters);
709      if ($parameters->{flag}){      if ($parameters->{flag}){
710        $max_sims = $parameters->{max_sims};        $max_sims = $parameters->{max_sims};
711        $max_expand = $parameters->{max_expand};        $max_expand = $parameters->{max_expand};
712        $max_eval = $parameters->{max_eval};        $max_eval = $parameters->{max_eval};
713        $db_filter = $parameters->{db_filter};        $db_filter = $parameters->{db_filter};
714        $sim_order = $parameters->{sim_order};        $sim_filters->{ sort_by } = $parameters->{sim_order};
715          #$sim_order = $parameters->{sim_order};
716        $group_by_genome = 1 if (defined ($parameters->{group_genome}));        $group_by_genome = 1 if (defined ($parameters->{group_genome}));
717      }      }
718      else{      else{
# Line 709  Line 720 
720        $max_expand = 5;        $max_expand = 5;
721        $max_eval = 1e-5;        $max_eval = 1e-5;
722        $db_filter = "figx";        $db_filter = "figx";
723        $sim_order = "id";        $sim_filters->{ sort_by } = 'id';
724          #$sim_order = "id";
725      }      }
726    
727      my($id, $genome, @genomes, %sims);      my($id, $genome, @genomes, %sims);
728      my @tmp= $fig->sims($fid,$max_sims,$max_eval,$db_filter,$max_expand);      my @tmp= $fig->sims($fid,$max_sims,$max_eval,$db_filter,$max_expand,$sim_filters);
729      @tmp = grep { !($_->id2 =~ /^fig\|/ and $fig->is_deleted_fid($_->id2)) } @tmp;      @tmp = grep { !($_->id2 =~ /^fig\|/ and $fig->is_deleted_fid($_->id2)) } @tmp;
730      my ($dataset);      my ($dataset);
731    
# Line 1137  Line 1149 
1149          my $organism = $fig->org_of($id);          my $organism = $fig->org_of($id);
1150          my $single_domain = [];          my $single_domain = [];
1151          push(@$single_domain,$who);          push(@$single_domain,$who);
1152          push(@$single_domain,&HTML::set_prot_links($cgi,$id));          push(@$single_domain,"<a href='?page=Annotation&feature=$id'>$id</a>");
1153          push(@$single_domain,$organism);          push(@$single_domain,$organism);
1154          push(@$single_domain,$assignment);          push(@$single_domain,$assignment);
1155          push(@$all_domains,$single_domain);          push(@$all_domains,$single_domain);
# Line 2227  Line 2239 
2239          $white = '#999966' if ($id eq $query_fid);          $white = '#999966' if ($id eq $query_fid);
2240          $org_color = '#999966' if ($id eq $query_fid);          $org_color = '#999966' if ($id eq $query_fid);
2241          my $anchor_name = "anchor_". $replace_id;          my $anchor_name = "anchor_". $replace_id;
2242            my $checked = ""; $checked = "checked" if ($id eq $query_fid);
2243          if ($id =~ /^fig\|/){          if ($id =~ /^fig\|/){
2244            my $box = qq(<a name="$anchor_name"></a><input type="checkbox" name="seq" value="$id" id="$field_name" onClick="VisualCheckPair('$field_name', '$pair_name','$cell_name');">);            my $box = qq(<a name="$anchor_name"></a><input type="checkbox" name="seq" value="$id" id="$field_name" onClick="VisualCheckPair('$field_name', '$pair_name','$cell_name');" $checked>);
2245            my $radio = qq(<input type="radio" name="function_select" value="$id" id="$field_name" >);            my $radio = qq(<input type="radio" name="function_select" value="$id" id="$field_name" >);
2246            $box_cell = { 'data'=>$box, 'highlight'=>$org_color};            $box_cell = { 'data'=>$box, 'highlight'=>$org_color};
2247            $radio_cell = { 'data'=>$radio, 'highlight'=>$white};            $radio_cell = { 'data'=>$radio, 'highlight'=>$white};
# Line 2241  Line 2254 
2254    
2255          # get the linked fig id          # get the linked fig id
2256          my $anchor_link = "graph_" . $replace_id;          my $anchor_link = "graph_" . $replace_id;
2257          my $fig_data =  "<table><tr><td>" . &HTML::set_prot_links($cgi,$id) . "</td>" . "&nbsp;" x 2;          my $fig_data =  "<table><tr><td><a href='?page=Annotation&feature=$id'>$id</a></td>" . "&nbsp;" x 2;
2258          $fig_data .= qq(<td><img height='10px' width='20px' src='./Html/anchor_alignment.png' alt='View Graphic View of Alignment' onClick='changeSimsLocation("$anchor_link", 0)'/></td></tr></table>);          $fig_data .= qq(<td><img height='10px' width='20px' src='./Html/anchor_alignment.png' alt='View Graphic View of Alignment' onClick='changeSimsLocation("$anchor_link", 0)'/></td></tr></table>);
2259          my $fig_col = {'data'=> $fig_data,          my $fig_col = {'data'=> $fig_data,
2260                         'highlight'=>$white};                         'highlight'=>$white};
# Line 2292  Line 2305 
2305          }          }
2306    
2307          if ( ( $application->session->user) ){          if ( ( $application->session->user) ){
2308              if ( ($application->session->user->login) && ($application->session->user->login eq "arodri")){              my $user = $application->session->user;
2309                if ($user && $user->has_right(undef, 'annotate', 'genome', $fig->genome_of($id))) {
2310                  push (@$single_domain,$radio_cell);                  push (@$single_domain,$radio_cell);
2311              }              }
2312          }          }
# Line 2567  Line 2581 
2581              my $pretty_code = $code->[2];              my $pretty_code = $code->[2];
2582              if ($pretty_code =~ /;/) {              if ($pretty_code =~ /;/) {
2583                  my ($cd, $ss) = split(";", $code->[2]);                  my ($cd, $ss) = split(";", $code->[2]);
2584                    print STDERR "$id: $cd, $ss\n";
2585                    if ($cd =~ /ilit|dlit/){
2586                        my ($type,$pubmed_id) = ($cd) =~ /(.*?)\((.*)\)/;
2587                        my $publink = &HTML::alias_url($pubmed_id,'PMID');
2588                        $cd = $type . "(<a href='" . $publink . "'>" . $pubmed_id . "</a>)";
2589                    }
2590                  $ss =~ s/_/ /g;                  $ss =~ s/_/ /g;
2591                  $pretty_code = $cd;# . " in " . $ss;                  $pretty_code = $cd;# . " in " . $ss;
2592              }              }

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.65

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3