18 |
use FIG; |
use FIG; |
19 |
my $fig = new FIG; |
my $fig = new FIG; |
20 |
|
|
21 |
# usage: conditionally_assign [User] < 3-column-assignments [PEG,Old,New] |
( |
22 |
|
($user = shift @ARGV) && |
23 |
$user = "master"; |
($annot = shift @ARGV) |
24 |
$annotations = 1; |
) |
25 |
|
|| die "conditionally_assign User Annotation"; |
|
foreach $arg (@ARGV) |
|
|
{ |
|
|
if ($arg eq "no_annotations") |
|
|
{ |
|
|
$annotations = 0; |
|
|
} |
|
|
else |
|
|
{ |
|
|
$user = $arg; |
|
|
} |
|
|
} |
|
26 |
|
|
27 |
while ($_ = <STDIN>) |
while ($_ = <STDIN>) |
28 |
{ |
{ |
29 |
chomp; |
chomp; |
30 |
( $peg, $old, $new ) = split(/\t/,$_); |
my( $peg, $old, $new ) = split(/\t/,$_); |
31 |
if ( $peg && $new && $old eq $fig->function_of( $peg ) ) |
if ( $peg && $new && $old eq $fig->function_of( $peg ) ) |
32 |
{ |
{ |
33 |
$fig->assign_function( $peg, $user, $new, "" ); |
$fig->assign_function( $peg, $user, $new, "" ); |
34 |
|
$fig->add_annotation($peg,$user,$annot); |
35 |
} |
} |
36 |
} |
} |
|
|
|