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

View of /FigKernelScripts/conditionally_assign.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (download) (as text) (annotate)
Sat Aug 23 23:39:22 2008 UTC (11 years, 5 months ago) by golsen
Branch: MAIN
CVS Tags: mgrast_rel_2008_0806, mgrast_rel_2008_0919, mgrast_rel_2008_0917
Changes since 1.3: +6 -24 lines
Move writing of assignment annotation from a case-by-case basis (and it
was missing in several key places) to the FIG::assign_function.

Modify the code in each of the calling locations to not make duplicate
annotations.

At the same time, remove (most) of the instances of making different
calls to assign_function depending on the user name.  assign_function
treats everyone as master (but writes an annotation with the real user
name).

#
# Copyright (c) 2003-2008 University of Chicago and Fellowship
# for Interpretations of Genomes. All Rights Reserved.
#
# This file is part of the SEED Toolkit.
# 
# The SEED Toolkit is free software. You can redistribute
# it and/or modify it under the terms of the SEED Toolkit
# Public License. 
#
# You should have received a copy of the SEED Toolkit Public License
# along with this program; if not write to the University of Chicago
# at info@ci.uchicago.edu or the Fellowship for Interpretation of
# Genomes at veronika@thefig.info or download a copy from
# http://www.theseed.org/LICENSE.TXT.
#

use FIG;
my $fig = new FIG;

# usage: conditionally_assign [User] < 3-column-assignments [PEG,Old,New]

$user = "master";
$annotations = 1;

foreach $arg (@ARGV)
{
    if ($arg eq "no_annotations")
    {
	$annotations = 0;
    }
    else
    {
	$user = $arg;
    }
}

while ($_ = <STDIN>)
{
    chomp;
    ( $peg, $old, $new ) = split(/\t/,$_);
    if ( $peg && $new && $old eq $fig->function_of( $peg ) )
    {
        $fig->assign_function( $peg, $user, $new, "" );
    }
}


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3