61 |
close(SYN); |
close(SYN); |
62 |
} |
} |
63 |
|
|
|
my $changes = {}; |
|
|
if (open(TMP, "<$FIG_Config::global/changed.location.features")) |
|
|
{ |
|
|
while ($_ = <TMP>) |
|
|
{ |
|
|
if ($_ =~ /^(fig\|\d+\.\d+\.[a-zA-Z]+\.\d+)/) |
|
|
{ |
|
|
$changes->{$1}++; |
|
|
} |
|
|
} |
|
|
close(TMP); |
|
|
} |
|
|
|
|
64 |
foreach $genome (@genomes) |
foreach $genome (@genomes) |
65 |
{ |
{ |
66 |
Trace("Processing $genome.") if T(3); |
Trace("Processing $genome.") if T(3); |
75 |
open(TBL,"<$organisms_dir/$genome/Features/$type/tbl")) |
open(TBL,"<$organisms_dir/$genome/Features/$type/tbl")) |
76 |
{ |
{ |
77 |
Trace("Loading $genome/Features/$type/tbl") if T(4); |
Trace("Loading $genome/Features/$type/tbl") if T(4); |
78 |
while (defined($_ = <TBL>)) |
my @tbl = <TBL>; |
79 |
|
close(TBL); |
80 |
|
my %seen; |
81 |
|
|
82 |
|
while ($_ = pop @tbl) |
83 |
{ |
{ |
84 |
chop; |
chop; |
85 |
($id,$loc,@aliases) = split(/\t/,$_); |
($id,$loc,@aliases) = split(/\t/,$_); |
86 |
|
|
87 |
if ($id && ($_ = $changes->{$id})) # check for obsolete entries due to location changes |
if ($id && (! $seen{$id})) |
|
{ |
|
|
$changes->{$id}--; |
|
|
next; |
|
|
} |
|
|
|
|
|
if ($id) |
|
88 |
{ |
{ |
89 |
|
$seen{$id} = 1; |
90 |
my($minloc,$maxloc); |
my($minloc,$maxloc); |
91 |
if ($loc) |
if ($loc) |
92 |
{ |
{ |
129 |
} |
} |
130 |
} |
} |
131 |
} |
} |
|
close(TBL); |
|
132 |
} |
} |
133 |
} |
} |
134 |
} |
} |