[Bio] / FigTutorial / batch_assignments.pl Repository:
ViewVC logotype

View of /FigTutorial/batch_assignments.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (download) (as text) (annotate)
Sat Aug 23 23:39:22 2008 UTC (11 years, 4 months ago) by golsen
Branch: MAIN
CVS Tags: rast_rel_2014_0912, rast_rel_2010_0928, rast_2008_0924, rast_rel_2008_09_30, rast_rel_2010_0526, rast_rel_2014_0729, rast_rel_2009_05_18, rast_rel_2009_0925, rast_rel_2010_1206, rast_rel_2010_0118, rast_rel_2009_02_05, rast_rel_2011_0119, rast_rel_2008_12_18, rast_rel_2008_10_09, rast_release_2008_09_29, rast_rel_2009_07_09, rast_rel_2010_0827, myrast_33, rast_rel_2011_0928, rast_rel_2008_09_29, rast_rel_2008_10_29, rast_rel_2009_03_26, rast_rel_2008_11_24, HEAD
Changes since 1.2: +5 -17 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).

use FIG;
my $fig = new FIG;

use strict;
my($usage,$user,$annotation,$text,$peg,$func,$conf,$user_name,$funcO);

$usage = "usage: batch_assignments User [AnnotationFile] < Assignments";

($user = shift @ARGV)
    || die $usage;

if ($annotation = shift @ARGV)
{
    $text = join("",`cat $annotation`);
}
else
{
    $text = "";
}

while (defined($_ = <STDIN>))
{
    chop;
    ($peg,$func,$conf) = split(/\t/,$_);
    if (! $conf) { $conf = "" }

    $funcO = $fig->function_of($peg);
    if ($funcO ne $func)
    {
	#  assign_function also writes an annotation
	$fig->assign_function( $peg, $user, $func, $conf );
    }
}
    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3