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

Diff of /FigKernelPackages/FIG.pm

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

revision 1.32, Wed Mar 3 12:49:23 2004 UTC revision 1.33, Wed Mar 3 14:56:43 2004 UTC
# Line 2418  Line 2418 
2418      return ();      return ();
2419  }  }
2420    
2421    sub related_by_func_sim {
2422        my($self,$peg,$user) = @_;
2423        my($func,$sim,$id2,%related);
2424    
2425        if (($func = $self->function_of($peg,$user)) && (! &FIG::hypo($func)))
2426        {
2427            foreach $sim ($self->sims($peg,500,1,"fig",500))
2428            {
2429                $id2 = $sim->id2;
2430                if ($func eq $self->function_of($id2,$user))
2431                {
2432                    $related{$id2} = 1;
2433                }
2434            }
2435        }
2436        return keys(%related);
2437    }
2438    
2439  ################################# chromosomal clusters ####################################  ################################# chromosomal clusters ####################################
2440    
2441  =pod  =pod
# Line 2699  Line 2717 
2717    
2718  =pod  =pod
2719    
2720    =head1 merged_related_annotations
2721    
2722    usage: @annotations = $fig->merged_related_annotations($fids)
2723    
2724    The set of annotations of a set of PEGs ($fids) is returned as a list of 4-tuples.
2725    Each entry in the list is of the form [$fid,$timestamp,$user,$annotation].
2726    
2727    =cut
2728    
2729    sub merged_related_annotations {
2730        my($self,$fids) = @_;
2731        my($fid);
2732        my(@ann) = ();
2733    
2734        foreach $fid (@$fids)
2735        {
2736            push(@ann,$self->feature_annotations1($fid));
2737        }
2738        return map { $_->[1] = localtime($_->[1]); $_ } sort { $a->[1] <=> $b->[1] } @ann;
2739    }
2740    
2741    =pod
2742    
2743  =head1 feature_annotations  =head1 feature_annotations
2744    
2745  usage: @annotations = $fig->feature_annotations($fid)  usage: @annotations = $fig->feature_annotations($fid)
# Line 2711  Line 2752 
2752    
2753  sub feature_annotations {  sub feature_annotations {
2754      my($self,$feature_id) = @_;      my($self,$feature_id) = @_;
2755    
2756        return map { $_->[1] = localtime($_->[1]); $_ } $self->feature_annotations1($feature_id);
2757    }
2758    
2759    sub feature_annotations1 {
2760        my($self,$feature_id) = @_;
2761      my($tuple,$fileN,$seek,$ln,$annotation,$feature_idQ);      my($tuple,$fileN,$seek,$ln,$annotation,$feature_idQ);
2762      my($file,$fh);      my($file,$fh);
2763    
# Line 2732  Line 2779 
2779              print STDERR "malformed annotation\n$annotation\n";              print STDERR "malformed annotation\n$annotation\n";
2780          }          }
2781      }      }
2782      return map { $_->[1] = localtime($_->[1]); $_ } sort { $a->[1] <=> $b->[1] } @annotations;      return sort { $a->[1] <=> $b->[1] } @annotations;
2783  }  }
2784    
2785  sub read_annotation {  sub read_annotation {

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3