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

View of /FigKernelScripts/make_calls.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Mon Dec 1 20:46:40 2003 UTC (16 years ago) by efrank
Branch: MAIN
CVS Tags: V00-00-01, delong-01, delong-02, V00-00-00

Makefile:
	get it to work with the release tools

All the rest:
	had to rename foo to foo.pl so that makefiles could recognize
	perl source from, say, Makefiles and READMEs

use FIG;

$/ = "\n\n";
while (defined($_ = <STDIN>))
{
    if ($_ =~ /(\S+)[^\n]*\n((\s+[0-9\.]+\s+\S[^\n]+\n)+)/s)
    {
	$id = $1;
	@calls = map { $_ =~ /^\s+([0-9\.]+)\s+(\S.*\S)/; ($1 && $2) ? [$1,$2] : () } split(/\n/,$2);
	if (@calls > 0)
	{
	    $hypo1 = &FIG::hypo($calls[0]->[1]);
	    if ((! $hypo1) &&
		((@calls < 2) || ($calls[0]->[0] > $calls[1]->[0])))
	    {
		print "$id\t$calls[0]->[1]\n";
	    }
	    elsif ($hypo1 &&
		   (@calls > 1) && (! &FIG::hypo($calls[1]->[1])) && 
		   ((@calls == 2) || ($calls[1]->[0] > (1.1 * $calls[2]->[0]))))
	    {
		print "$id\t$calls[1]->[1]\tW\n";
	    }
	    elsif ($calls[0]->[1] =~ /hypothetical/)
	    {
		print "$id\t$calls[0]->[1]\n";
	    }
	    else
	    {
		print "$id\thypothetical protein\n";
	    }
	}
    }
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3