This file is indexed.

/usr/share/perl5/GO/ObjCache.pm is in libgo-perl 0.15-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# $Id: ObjCache.pm,v 1.3 2005/05/20 18:46:57 cmungall Exp $
#
# This GO module is maintained by Chris Mungall <cjm@fruitfly.org>
#
# see also - http://www.geneontology.org
#          - http://www.godatabase.org/dev
#
# You may distribute this module under the same terms as perl itself

package GO::ObjCache;

=head1 NAME

  GO::ObjCache - private method

=head1 DESCRIPTION

This is a kind of L<GO::ObjFactory> - you should not need to use this
method directly

=cut

use Carp;
use strict;
use Exporter;
use GO::Utils qw(rearrange);
#use strict;
use FileHandle;
use Exporter;
use vars qw(@ISA);
use strict;

use base qw(GO::Model::Graph GO::ObjFactory);

sub _valid_params {
    return qw(dbh);
}

sub _initialize {
    my $self = shift;
    $self->SUPER::_initialize(@_);
}

sub apph {
    my $self = shift;
    $self->{apph} = shift if @_;
    return $self->{apph} || $self;
}

sub n_deep_associations {
    my $self = shift;
    my $acc = shift;
    $self->extend_down([$acc]);   # make sure all terms loaded
    $self->SUPER::n_deep_associations($acc);
}

sub deep_association_list {
    my $self = shift;
    my $acc = shift;
    $self->extend_down([$acc]);   # make sure all terms loaded
    $self->SUPER::deep_association_list($acc);
}

#------

sub extend_graph_by_acc {
    my $self = shift;
    my $graph = shift;
    my $acc = shift;
    my $depth = shift;

    my $term = $self->get_term($acc);
    $self->extend_up($graph, [$acc]);
    $self->extend_down($graph, [$acc], $depth);

}

sub extend_up {
    my $self = shift;
    my $graph = shift;
    my @accs = @{shift || []};
    my $i=0;
    while ($i < scalar(@accs)) {
	my $acc = $accs[$i];
	$i++;
	my $term = $self->get_term($acc);
	$graph->add_term($term);
	my $parent_rels = $self->get_parent_relationships($acc);
	foreach my $rel (@$parent_rels) {
	    $graph->add_relationship($rel);
	    if (!(grep {$_ == $rel->acc1} @accs)) {
		# only put new accs in
		push(@accs, $rel->acc1);
	    }
	}
    } @accs;
}

sub extend_down {
    my $self = shift;
    my $graph = shift;
    my @accs = @{shift || []};
    my $max_depth = shift;

    my $i=0;
    while ($i < scalar(@accs)) {
	printf STDERR
	  "======== %d %d %s\n",
	  $i,
	  $#accs,
	  join(", ", @accs);
	my $acc = $accs[$i];
	$i++;
	my $term = $self->get_term($acc);
	$graph->add_term($term);
	my $child_rels = $self->get_child_relationships($acc);
	foreach my $rel (@$child_rels) {
	    $graph->add_relationship($rel);
	    if (!(grep {$_ == $rel->acc2} @accs)) {
		# only put new accs in
		push(@accs, $rel->acc2);
	    }
	}
    } @accs;
    
}

sub get_deep_product_count { 0 }

1;