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

View of /FigKernelScripts/assign_to_hypo.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (download) (as text) (annotate)
Thu Apr 8 11:49:33 2004 UTC (16 years, 1 month ago) by overbeek
Branch: MAIN
CVS Tags: merge-trunktag-bobdev_news-2, Root-bobdev_news, merge-bobdev_news-1, caBIG-dataload-0, merge-trunktag-bobdev_news-1, merge-bodev_news-3, efrank-preMakefileToStandardMk, caBIG-00-00-00, merge-bobdev_news-2, merge-trunktag-bodev_news-3
Branch point for: Branch-bobdev_news
Changes since 1.1: +7 -1 lines
fixes in auto assignments

use FIG;
my $fig = new FIG;

$usage = "usage: assign_to_hypo Genome [functions=FunctionFile] [Parms for auto_assign]";

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

if ($ARGV[0] =~ /^functions=(\S+)/)
{
    $functions_file = $1;
    %assigned = map { $_ =~ /^(\S+)\t(\S[^\t\n]+\S)/; $1 => $2 } `cat $functions_file`;
    shift @ARGV;
    $use_file = 1;
}

open(TMP,">/tmp/tmp$$.fids") 
    || die "aborted";
foreach $fid ($fig->all_features($genome,"peg"))
{
    $func = $use_file ? $assigned{$fid} : scalar $fig->function_of($fid);
    if (&FIG::hypo($func))
    {
	print TMP "$fid\n";
    }
}
close(TMP);
$parms = join(" ",@ARGV);
foreach $_ (`auto_assign $parms < /tmp/tmp$$.fids | make_calls`)
{
    if (($_ =~ /^\S+\t(\S[^\t]+\S)/) && (! &FIG::hypo($1)))
    {
	print $_;
    }
}
unlink("/tmp/tmp$$.fids");


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3