[Bio] / FigKernelScripts / conditionally_assign.pl Repository:
ViewVC logotype

Diff of /FigKernelScripts/conditionally_assign.pl

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

revision 1.4, Sat Aug 23 23:39:22 2008 UTC revision 1.5, Mon Sep 22 12:42:31 2008 UTC
# Line 18  Line 18 
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  }  }
   

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3