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

View of /FigKernelScripts/fig_rpc.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, 6 months ago) by golsen
Branch: MAIN
CVS Tags: mgrast_dev_08112011, rast_rel_2009_05_18, mgrast_dev_08022011, rast_rel_2014_0912, myrast_rel40, mgrast_dev_05262011, rast_rel_2008_12_18, mgrast_dev_04082011, rast_rel_2010_0928, rast_2008_0924, mgrast_version_3_2, mgrast_dev_12152011, mgrast_dev_06072011, rast_rel_2008_09_30, rast_rel_2009_0925, rast_rel_2010_0526, rast_rel_2014_0729, mgrast_dev_02212011, rast_rel_2010_1206, mgrast_release_3_0, mgrast_dev_03252011, rast_rel_2010_0118, mgrast_rel_2008_0924, mgrast_rel_2008_1110_v2, rast_rel_2009_02_05, rast_rel_2011_0119, mgrast_rel_2008_0625, mgrast_release_3_0_4, mgrast_release_3_0_2, mgrast_release_3_0_3, mgrast_release_3_0_1, mgrast_dev_03312011, mgrast_release_3_1_2, mgrast_release_3_1_1, mgrast_release_3_1_0, mgrast_dev_04132011, rast_rel_2008_10_09, mgrast_dev_04012011, rast_release_2008_09_29, mgrast_rel_2008_0806, mgrast_rel_2008_0923, mgrast_rel_2008_0919, rast_rel_2009_07_09, rast_rel_2010_0827, mgrast_rel_2008_1110, myrast_33, rast_rel_2011_0928, rast_rel_2008_09_29, mgrast_rel_2008_0917, rast_rel_2008_10_29, mgrast_dev_04052011, mgrast_dev_02222011, rast_rel_2009_03_26, mgrast_dev_10262011, rast_rel_2008_11_24, HEAD
Changes since 1.3: +9 -42 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).

# -*- perl -*-
#
# 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 Carp;
use Data::Dumper;
use Time::HiRes qw(gettimeofday);
use Time::Local;

use FIG;
use FIGrpc;

my($user);

# usage: fig [-echo] [-time] [-url seed-url] [command]

$echo       = 0;
$time_cmds  = 0;
while ((@ARGV > 0) && ($ARGV[0] =~ /^-/))
{
    $arg = shift @ARGV;
    if ($arg =~ /^-time/i) { $time_cmds = 1 }
    if ($arg =~ /^-echo/i) { $echo      = 1 }
    if ($arg =~ /^-url/i) 
    { 
	$url = shift(@ARGV);
    }
}

if ($url)
{
    $fig = new FIGrpc;
}
else
{
    $fig = new FIG;
}

my($t1,$t2);
if (@ARGV > 0)  { $req = join( " ", @ARGV ); }
while ( (defined($req) && $req) || ((@ARGV == 0) && ($req = &get_req)) )
{
    if ($time_cmds)
    {
	$t1 = gettimeofday;
    }

    if ($req =~ /^\s*DB\s*$/)
    {
	print "\n$FIG_Config::db\n\n";
    }
    elsif ($req =~ /^\s*translate\s+(\S+)(\s+\S+)?\s*$/)
    {
	$dna    = $1;
	$start  = $2 ? 1 : 0;
	print $fig->translate($dna,undef,$start),"\n";
    }
    elsif ($req =~ /^\s*reverse_comp\s+(\S+)\s*$/)
    {
	$dna    = $1;
	print $fig->reverse_comp($dnao),"\n";
    }
    elsif ($req =~ /^\s*standard_genetic_code\s*$/)
    {
	print &Dumper($fig->standard_genetic_code),"\n";
    }
    elsif ($req =~ /^\s*cgi_url\s*$/)
    {
	print $fig->cgi_url,"\n";
    }
    elsif ($req =~ /^\s*temp_url\s*$/)
    {
	print $fig->temp_url,"\n";
    }
    elsif ($req =~ /^\s*max\s+(((\d+)\s+)*\d+)\s*$/)
    {
	print $fig->max(split(/\s+/,$1)),"\n\n";
    }
    elsif ($req =~ /^\s*add_genome\s+((.*\/)?(\d+\.\d+))\s*$/)
    {
	$genomeF = $1;
	$genome = $3;
	if ((! -d "$FIG_Config::organisms/$genome") && ($fig->add_genome($genomeF)))
	{
	    print "Added $genome\n";
	}
	else
	{
	    print "Failed to add $genome from $genomeF\n";
	}
    }
    elsif ($req =~ /^\s*delete_genomes\s+(\d.*\d)\s*$/)
    {
	$genomes = $1;
	@genomes = split(/\s+/,$genomes);
	if (@genomes > 0)
	{
	    @bad_genomes = grep { ! -d "$FIG_Config::organisms/$_" } @genomes;
	    if (@bad_genomes > 0)
	    {
		print "Bad Genomes: ",join(" ",@bad_genomes),"\n";
	    }
	    else
	    {
		$fig->delete_genomes(\@genomes);
		print "Completed deleting ",join(" ",@genomes),"\n";
	    }
	}
    }
    elsif ($req =~ /^\s*min\s+(((\d+)\s+)*\d+)\s*$/)
    {
	print $fig->min(split(/\s+/,$1)),"\n\n";
    }
    elsif ($req =~ /^\s*between\s+(\d+)\s+(\d+)\s+(\d+)\s*$/)
    {
	print $fig->between($1,$2,$3),"\n\n";
    }
    elsif ($req =~ /^\s*merge_related_annotations\s+(\S.*\S)\s*$/)
    {
	$pegs = [split(/\s+/,$1)];
	my @tmp = $fig->merged_related_annotations($pegs);
	print &Dumper(\@tmp);
	print "\n";
    }
    elsif ($req =~ /^\s*related_by_func_sim\s+(\S+)(\s+(\S+))?\s*$/)
    {
	$peg = $1;
	$user = $3 ? $3 : "";
	$func = $fig->function_of($peg,$user);
	print "PEGs related to $peg: $func\n\n";
	foreach $peg ($fig->related_by_func_sim($peg,$user))
	{
	    $func = $fig->function_of($peg1,$user);
	    print "$peg: $func\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*genomes(\s+(\S.*\S))?\s*$/)
    {
	$pat = $2;
	my @genomes = ($pat && ($pat =~ /^complete/i)) ? $fig->genomes("complete") : $fig->genomes;
	foreach $genome (@genomes)
	{
	    my $genus_species = $fig->genus_species($genome);
	    if ((! $pat) || ($pat =~ /^complete/i) || ($genus_species =~ /$pat/))
	    {
		print join("\t",(&padded($genome,15),$genus_species)),"\n";
	    }
	}
	print "\n";
    }
    elsif ($req =~ /^\s*restricted\s*$/)
    {
	foreach $genome ($fig->genomes)
	{
	    my $genus_species = $fig->genus_species($genome);
	    if (-s "$FIG_Config::organisms/$genome/RESTRICTIONS")
	    {
		print join("\t",(&padded($genome,15),$genus_species)),"\n";
	    }
	}
	print "\n";
    }
    elsif ($req =~ /^\s*genus_species\s+(\d+\.\d+)\s*$/)
    {
	print $fig->genus_species($1),"\n\n";
    }
    elsif ($req =~ /^\s*genome_counts(\s+complete)?\s*$/i)
    {
	($a,$b,$e,$v) = $fig->genome_counts($1);
	print "archaea=$a bacteria=$b eukaryotes=$e viral=$v\n";
    }
    elsif ($req =~ /^\s*file2N\s+(\S+)\s*$/)
    {
	print $fig->file2N($1),"\n\n";
    }
    elsif ($req =~ /^\s*genome_version\s+(\S+)\s*$/)
    {
	$_ = defined($_ = $fig->genome_version($1)) ? $_ : "undefined";
	print "$_\n\n";
    }
    elsif ($req =~ /^\s*crude_estimate_of_distance\s+(\S+)\s+(\S+)\s*$/)
    {
	print $fig->crude_estimate_of_distance($1,$2),"\n\n";
    }
    elsif ($req =~ /^\s*org_of\s+(\S+)\s*$/)
    {
	print $fig->org_of($1),"\n\n";
    }
    elsif ($req =~ /^\s*taxonomy_of\s+(\d+\.\d+)\s*$/)
    {
	print $fig->taxonomy_of($1),"\n\n";
    }
    elsif ($req =~ /^\s*coupling_and_evidence\s+(fig\|\d+\.\d+\.peg\.\d+)\s+(\d+)\s+(\S+)\s+(\S+)/)
    {
	$fid = $1;
	$bound = $2;
	$sim_cutoff = $3;
	$coup_cutoff = $4;
	@tmp = $fig->coupling_and_evidence($fid,$bound,$sim_cutoff,$coup_cutoff);
	print &Dumper(\@tmp),"\n\n";
    }
    elsif ($req =~ /^\s*fast_coupling\s+(fig\|\d+\.\d+\.peg\.\d+)\s+(\d+)\s+(\S+)/)
    {
	$fid = $1;
	$bound = $2;
	$coup_cutoff = $3;
	@tmp = $fig->fast_coupling($fid,$bound,$coup_cutoff);
	print &Dumper(\@tmp),"\n\n";
    }
    elsif ($req =~ /^\s*assignments_made\s+(\S+)\s+(\d{1,2}\/\d{1,2}\/\d{4})(\s+(\S.*\S))?\s*$/)
    {
	$who = $1;
	$date = $2;
	if ($3)
	{
	    $genomes = [split(/\s+/,$4)];
	}
	else
	{
	    $genomes = [$fig->genomes];
	}
	    
	foreach $assignment ($fig->assignments_made($genomes,$who,$date))
	{
	    print join("\t",@$assignment),"\n";
	}
    }
    elsif ($req =~ /^\s*auto_assign\s+(fig\|\d+\.\d+\.peg\.\d+)(\s+(\S+))?\s*$/)
    {
	$fid = $1;
	$seq = $3;
	print $fig->auto_assign($fid,$seq),"\n\n";
    }
    elsif ($req =~ /^\s*auto_assignG\s+(\S+)\s+(\S.*\S)\s*$/)
    {
	$user = $1;
	@genomes = split(/\s+/,$2);
	foreach $genome (@genomes)
	{
	    if (-s "$FIG_Config::organisms/$genome/Features/peg/tbl")
	    {
		print STDERR "making assignments for $genome\n";
		system "cut -f1 $FIG_Config::organisms/$genome/Features/peg/tbl > tmp$$ ; fig auto_assignF $user tmp$$";
		unlink("tmp$$");
	    }
	}
	print "\n";
    }
    elsif (($req =~ /^\s*auto_assignF\s+(\S+)\s+(\S+)\s*$/) && 
	   ($file = $2) && (-s $file) &&
	   ($user = $1))
    {
        $n = 0; 
        foreach $assignment (`cut -f1 $file | auto_assign | make_calls`)
        {
            if ($assignment =~ /^(\S+)\t(\S[^\t]+\S)(\t(\S))?\s*$/)
            {
		$prot = $1;
		$function = $2;
		$conf = $4 ? $4 : "";
		$n++;
		#  assign_function does everything now
		$fig->assign_function($prot,$user,$function,$conf);
	    }
	}
	close(TMP);
	print STDERR "$n assignments made (all attributed to $user)\n";
    }
    elsif ($req =~ /^\s*genes_in_region\s+(\d+\.\d+)\s+(\S+)\s+(\d+)\s+(\d+)\s*$/)
    {
	print &Dumper($fig->genes_in_region($1,$2,$3,$4)),"\n\n";
    }
    elsif ($req =~ /^\s*all_features\s+(\d+\.\d+)\s+(\S+)\s*$/)
    {
	@ids =  sort { $fig->by_fig_id($a,$b) } $fig->all_features($1,$2);
	while (@ids > 0)
	{
	    @tmp = splice(@ids,0,$fig->min(3,scalar @ids));
	    print join("\t",@tmp),"\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*function_of\s+(\S+)\s*(\S+)?\s*$/)
    {
	if ($2)
	{
	    $extra = $2;
	    $all   = ($extra =~ /all/i);
	    $tran  = ($extra =~ /tran/i);
	}
	if ($all)
	{
	    foreach $x ($fig->function_of($1))
	    {
		($who,$func) = @$x;
		if ($tran) { $func = $fig->translate_function($func) }
		print &padded($who,30)," $func\n";
	    }
	}
	else
	{
	    $func = $fig->function_of($1);
	    if ($tran) { $func = $fig->translate_function($func) }
	    print "$func\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*genome_of\s+(\S+)\s*$/)
    {
	print $fig->genome_of($1),"\n\n";
    }
    elsif ($req =~ /^\s*in_cluster_with\s+(\S+)\s*$/)
    {
	$peg = $1;
	@pegs = $fig->in_cluster_with($peg);
	$func = $fig->function_of($peg);
	print "$peg\t$func\n\n";
	foreach $peg (@pegs)
	{
	    $func = $fig->function_of($peg);
	    print "$peg\t$func\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*feature_location\s+(\S+)\s*$/)
    {
	$fid = $1;
	if ($loc = $fig->feature_location($fid))
	{
	    print "$loc\n";
	}
	else
	{
	    print "no location\n";
	}
    }
    elsif ($req =~ /^\s*translation_length\s+(\S+)\s*$/)
    {
	$fid = $1;
	if ($len = $fig->translation_length($fid))
	{
	    print "$len\n";
	}
	else
	{
	    print "no length for $fid\n";
	}
    }
    elsif ($req =~ /^\s*translatable\s+(\S+)\s*$/)
    {
	print $fig->translatable($1),"\n\n";
    }
    elsif ($req =~ /^\s*mapped_prot_ids\s+(\S+)\s*$/)
    {
	foreach $x ($fig->mapped_prot_ids($1))
	{
	    ($id,$len) = @$x;
	    print &padded($id,20),"\t$len\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*boundaries_of\s+(\S+)\s*$/)
    {
	print join("_",$fig->boundaries_of($1)),"\n\n";
    }
    elsif ($req =~ /^\s*contig_ln\s+(\S+)\s+(\S+)\s*$/)
    {
	print $fig->contig_ln($1,$2),"\n\n";
    }
    elsif ($req =~ /^\s*family_function\s+(\d+)\s*$/)
    {
	$family     = $1;
	$func       = $fig->family_function($family);
	print "family $family: $func\n\n";
    }
    elsif ($req =~ /^\s*in_family\s+(\S+)\s*$/)
    {
	$id         = $1;
	$n          = $fig->in_family($id);
	print "$id is in family $n\n\n";
    }
    elsif ($req =~ /^\s*all_protein_families\s*$/)
    {
	print "Fam.\tSize\n\n";
	foreach $family ($fig->all_protein_families)
	{
	    print "$family\t",$fig->sz_family($family),"\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*sz_family\s+(\d+)\s*$/)
    {
	$family     = $1;
	$sz         = $fig->sz_family($1);
	print "family $family contains $sz ids\n\n";
    }
    elsif ($req =~ /^\s*ids_in_family\s+(\d+)\s*$/)
    {
	$family     = $1;
	$func       = $fig->family_function($family);
	print "family $family: $func\n\n";
	@ids = $fig->ids_in_family($family);
	while (@ids > 0)
	{
	    @tmp = splice(@ids,0,$fig->min(3,scalar @ids));
	    print join("\t",@tmp),"\n";
	}
	print "\n";

    }
    elsif ($req =~ /^\s*in_sets\s+(\S+)\s+(\S+)\s+(\S+)\s*$/)
    {
	$id         = $1;
	$relation   = $2;
	$set_name   = $3;
	print "$id is in set(s) ",join(",",$fig->in_sets($id,$relation,$set_name)),"\n\n";
    }
    elsif ($req =~ /^\s*in_pch_pin_with\s+(\S+)\s*$/)
    {
	$id         = $1;
	print "$id is in set(s) ",join(",",$fig->in_pch_pin_with($id)),"\n\n";
    }
    elsif ($req =~ /^\s*exportable_subsystem\s+(\S.*\S+)\s*$/)
    {
	my $ssa = $1;
	my($spreadsheet,$notes) = $fig->exportable_subsystem($ssa);
	print join("",@$spreadsheet),join("",@$notes),"\n";
    }
    elsif ($req =~ /^\s*is_exchangable_subsystem\s+(\S.*\S+)\s*$/)
    {
	my $ssa = $1;
	print $fig->is_exchangable_subsystem($ssa),"\n";
    }
    elsif ($req =~ /^\s*all_exchangable_subsystems\s*$/)
    {
	print join("\n",$fig->all_exchangable_subsystems),"\n";
    }
    elsif ($req =~ /^\s*export_set\s+(\S+)\s+(\S+)\s+(\S+)\s*$/)
    {
	$relation   = $1;
	$set_name   = $2;
	$file       = $3;
	print $fig->export_set($relation,$set_name,$file),"\n\n";
    }
    elsif ($req =~ /^\s*export_chromosomal_clusters\s*$/)
    {
	print $fig->export_set("chromosomal_clusters","cluster_id","$FIG_Config::global/chromosomal_clusters"),"\n\n";
    }
    elsif ($req =~ /^\s*export_pch_pins\s*$/)
    {
	print $fig->export_set("pch_pins","pin","$FIG_Config::global/pch_pins"),"\n\n";
    }
    elsif ($req =~ /^\s*add_chromosomal_clusters\s+(\S+)\s*$/)
    {
	$file = $1;
	print $fig->add_chromosomal_clusters($file),"\n\n";
    }
    elsif ($req =~ /^\s*add_pch_pins\s+(\S+)\s*$/)
    {
	$file = $1;
	print $fig->add_pch_pins($file),"\n\n";
    }
    elsif ($req =~ /^\s*all_sets\s+(\S+)\s+(\S+)\s*$/)
    {
	$relation   = $1;
	$set_name   = $2;
	print "Set\tSize\n\n";
	foreach $set ($fig->all_sets($relation,$set_name))
	{
	    print "$set\t",$fig->sz_set($set,$relation,$set_name),"\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*sz_set\s+(\d+)\s+(\S+)\s+(\S+)\s*$/)
    {
	$set        = $1;
	$relation   = $2;
	$set_name   = $3;
	$sz         = $fig->sz_set($1,$2,$3);
	print "$set_name $set contains $sz ids\n\n";
    }
    elsif ($req =~ /^\s*next_set\s+(\S+)\s+(\S+)\s*$/)
    {
	$relation   = $1;
	$set_name   = $2;
	print $fig->next_set($relation,$set_name)," is the next $set_name for $set\n\n";
    }
    elsif ($req =~ /^\s*ids_in_set\s+(\d+)\s+(\S+)\s+(\S+)\s*$/)
    {
	$set        = $1;
	$relation   = $2;
	$set_name   = $3;
	print "$set_name $set\n\n";
	@ids = $fig->ids_in_set($set,$relation,$set_name);
	while (@ids > 0)
	{
	    @tmp = splice(@ids,0,$fig->min(3,scalar @ids));
	    print join("\t",@tmp),"\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*seqs_with_roles_in_genomes\s+(\S+)\s+(\S+)\s+(\S+)\s*$/)
    {
	$genomesF = $1;
	$rolesF   = $2;
	$who = $3;
	$genomes = [map { chop; $_ } `cat $genomesF`];
	$roles   = [map { chop; $_ } `cat $rolesF`];
	print &Dumper($fig->seqs_with_roles_in_genomes($genomes,$roles,$who));
	print "\n";
    }
    elsif ($req =~ /^\s*seqs_with_role\s+(\S+)\s+(\S+)\s+(\S.*\S)\s*$/)
    {
	$genome = $1;
	$role   = $3;
	$who    = $2;
	foreach $peg ($fig->seqs_with_role($role,$who,$genome))
	{
	    $func = $fig->function_of($peg,$who);
	    print "$peg\t$func\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*load_all\s*$/)
    {
	if ($fig->load_all)
	{
	    print "imported everything\n";
	}
    }
    elsif ($req =~ /^\s*dsims\s+(\S+)(\s+(\S+)\s+(\S+)\s+(\S+))?\s*$/)
    {
	$file    = $1;
	$maxN    = $3 ? $3 : 500;
	$maxP    = $4 ? $4 : 1,0e-5;
	$select  = $5 ? $5 : "raw";
	if (open(TMP,"<$file"))
	{
	    $_ = <TMP>;
	    while (defined($_) && ($_ =~ /^>(\S+)/))
	    {
		$id = $1;
		@seqs = ();
		while (defined($_ = <TMP>) && ($_ !~ /^>/))
		{
		    push(@seqs,$_);
		}
		$seq = join("",@seqs);
		$seq =~ s/\s//gs;
		if (@sims = $fig->dsims($id,$seq,$maxN,$maxP,$select))
		{
		    print "$id\t",length($seq),"\n\n";
		    foreach $sim (@sims)
		    {
			$func = $fig->function_of($sim->id2);
			print join("\t",($sim->id2(),
					 $sim->ln2,
					 $sim->psc,
					 $sim->b1,
					 $sim->e1,
					 $sim->b2,
					 $sim->e2,
					 $sim->iden,
					 $func)),"\n";
		    }
		    print "\n";
		}
	    }
	    close(TMP);
	}
	print "\n";
    }
    elsif ($req =~ /^\s*access_sims\s+(\S+)?\s*$/)
    {
	$opt = $1 ? $1 : "";
	foreach $peg ("fig|562.1.peg.14","fig|630.1.peg.589","fig|731.2.peg.1626","fig|75985.1.peg.2319","fig|294.1.peg.4630","fig|305.1.peg.2718","fig|292.1.peg.3262","fig|519.1.peg.4061","fig|633.1.peg.2431","fig|384.1.peg.2479")
	{
	    @sims = $fig->sims($peg,600,1.0e-3,"raw");
	    if ($opt =~ /expand/)
	    {
		foreach $sim (@sims)
		{
		    @map = $fig->mapped_prot_ids($sim->id2);
		    foreach $to (@map)
		    {
			if ($opt =~ /func/)
			{
			    @funcs = $fig->function_of($to->[0]);
			}
		    }
		}
	    }
	    elsif ($opt =~ /func/)
	    {
		foreach $sim (@sims)
		{
		    @funcs = $fig->function_of($sim->id2);
		}
	    }
	}
    }
    elsif ($req =~ /^\s*bbhs\s+(\S+)\s+(\S+)\s*$/)
    {
	$id      = $1;
	$cutoff = $2;
	foreach $_ ($fig->bbhs($id,$cutoff))
	{
	    print join("\t",@$_),"\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*sims\s+(\S+)(\s+(\S+)\s+(\S+)\s+(\S+)\s+(\d))?\s*$/)
    {
	$id      = $1;
	$maxN    = $3 ? $3 : 500;
	$maxP    = $4 ? $4 : 1,0e-5;
	$select  = $5 ? $5 : "raw";
	$tran = $6;

	$func = $fig->function_of($id);
	if (@sims = $fig->sims($id,$maxN,$maxP,$select))
	{
	    print &padded($id,20),"\t",$sims[0]->ln1."\t$func\n\n";
	    foreach $sim (@sims)
	    {
		$func = $fig->function_of($sim->id2);
		if ($tran) { $func = $fig->translate_function($func) }

		$org  = $fig->org_of($sim->id2);
		print join("\t",(&padded($sim->id2,20),
				 $sim->ln2,
				 $sim->psc,
				 $sim->b1,
				 $sim->e1,
				 $sim->b2,
				 $sim->e2,
				 $sim->iden,
				 $org,
				 $func)),"\n";
	    }
	}
	print "\n";
    }
    elsif ($req =~ /^\s*get_translation\s+(\S+)\s*$/)
    {
	$id     = $1;
	$seq = $fig->get_translation($id);
	print "$seq\n";
	print "\n";
    }
    elsif ($req =~ /^\s*get_translations\s+(\S+)(\s+tab)?\s*$/i)
    {
	$file = $1;
	$tab = $2 ? 1 : 0;
	if (open(TMP,"<$file"))
	{
	    while (defined($_ = <TMP>))
	    {
		foreach $id ($_ =~ /\S+/g)
		{
		    if ($seq = $fig->get_translation($id))
		    {
			if ($tab)
			{
			    print "$id\t$seq\n";			
                        }
			else
			{
			    $fig->display_id_and_seq($id,\$seq);
			}
		    }
		}
	    }
	    close(TMP);
	}
	else
	{
	    print STDERR "could not open $file\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*blast\s+(\S+)\s*$/)
    {
	$id     = $1;
	$func = $fig->function_of($id);

	if ($sims = &Blast::blastp([[$id,$fig->get_translation($id)]],"$FIG_Config::global/nr","-e 1.0e-5",0,0))
	{
	    $sims = $sims->{$id};

	    print &padded($id,20),"\t",$sims->[0]->ln1."\t$func\n\n";
	    foreach $sim (@$sims)
	    {
		$func = $fig->function_of($sim->id2);
		$org  = $fig->org_of($sim->id2);
		print join("\t",(&padded($sim->id2,20),
				 $sim->ln2,
				 $sim->psc,
				 $sim->b1,
				 $sim->e1,
				 $sim->b2,
				 $sim->e2,
				 $org,
				 $func)),"\n";
	    }
	}
	print "\n";
    }
    elsif ($req =~ /^\s*neighborhood_of_role\s+(\S.*\S)\s*$/)
    {
	$role     = $1;
	@tmp      = $fig->neighborhood_of_role($role);
	print     "$role\n\n",join("\n",@tmp),"\n";
	print "\n";
    }
    elsif ($req =~ /^\s*feature_annotations\s+(\S+)\s*$/)
    {
	$fid = $1;
	print "Annotations of $fid\n\n";
	@annotations = $fig->feature_annotations($fid);
	foreach $x (@annotations)
	{
	    (undef,$ts,$who,$annotation) = @$x;
	    print "$ts\t$who\n$annotation\n============\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*dna_seq\s+(\S+)\s+(\S+)\s*$/)
    {
	$seq = $fig->dna_seq($1,split(/,/,$2));
	print "$seq\n\n";
    }
    elsif ($req =~ /^\s*roles_of_function\s+(\S.*\S)\s*$/)
    {
	$func     = $1;
	@tmp      = $fig->roles_of_function($func);
	print     "$func\n\n",join("\n",@tmp),"\n";
	print "\n";
    }
    elsif ($req =~ /^\s*assign_function\s+(\S+)\s+(\S+)(\s+conf=(\S))?\s+(\S.*\S)\s*$/)
    {
	$peg      = $1;
	$user     = $2;
	$conf     = $3 ? $4 : "";
	$func     = $5;
	print $fig->assign_function($peg,$user,$func,$conf),"\n\n";
    }
    elsif ($req =~ /^\s*assign_functionF\s+(\S+)\s+(\S+)(\s+no_annotations)?\s*$/)
    {
	$user     = $1;
	$file     = $2;
	$no_annotations = $3;
	if (open(TMP,"<$file"))
	{
	    while (defined($_ = <TMP>))
	    {
		chop;
		($peg,$func,$conf) = split(/\t/,$_);
		if (! $conf) { $conf = "" }

		$funcO = $fig->function_of($peg);
		if ($funcO ne $func)
		{
		    #  assign_function does everything now
		    $fig->assign_function($peg,$user,$func,$conf);
		}
	    }
	    close(TMP);
	}
    }
    elsif ($req =~ /^\s*feature_location\s+(\S+)\s*$/)
    {
	$id     = $1;
	$loc = $fig->feature_location($id);
	print "$loc\n";
	print "\n";
    }
    elsif ($req =~ /^\s*all_compounds\s*$/)
    {
	foreach $cid ($fig->all_compounds)
	{
	    @names = $fig->names_of_compound($cid);
	    print "$cid\t$names[0]\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*names_of_compound\s+(\S+)\s*$/)
    {
	$cid = $1;
	@names = $fig->names_of_compound($cid);
	foreach $name (@names)
	{
	    print "$cid\t$name\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*comp2react\s+(\S+)\s*$/)
    {
	$cid = $1;
	foreach $rid ($fig->comp2react($cid))
	{
	    $x = $fig->displayable_reaction($rid);
	    print "$x\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*reversible\s+(\S+)\s*$/)
    {
	$rid = $1;
	$rev = $fig->reversible($rid) ? "reversible" : "not reversible";;
	$displayable = $fig->displayable_reaction($rid);
	print "$rev\n$displayable\n\n";
    }
    elsif ($req =~ /^\s*catalyzed_by\s+(\S+)\s*$/)
    {
	$rid = $1;
	@ecs = $fig->catalyzed_by($rid);
	$displayable = $fig->displayable_reaction($rid);
	print "$displayable\n";
	foreach $ec (@ecs)
	{
	    $x = $fig->expand_ec($ec);
	    print "$x\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*catalyzes\s+(\S+)\s*$/)
    {
	$ec = $1;
	@rids = $fig->catalyzes($ec);
	print $fig->expand_ec($ec),"\n";
	foreach $rid (@rids)
	{
	    $displayable = $fig->displayable_reaction($rid);
	    print "$displayable\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*reaction2comp\s+(\S+)\s+(\d)\s*$/)
    {
	$rid = $1;
	$which = $2;
	@tmp = $fig->reaction2comp($rid,$which);
	print &Dumper(\@tmp);
	$displayable = $fig->displayable_reaction($rid);
	print "$displayable\n\n";
    }
    elsif ($req =~ /^\s*cas\s+(\S+)\s*$/)
    {
	$cid = $1;
	$cas = $fig->cas($cid);
	@names = $fig->names_of_compound($cid);
	print "$cid\t$cas\t$names[0]\n\n";
    }
    elsif ($req =~ /^\s*cas_to_cid\s+(\S+)\s*$/)
    {
	$cas = $1;
	$cid = $fig->cas_to_cid($cas);
	@names = $fig->names_of_compound($cid);
	print "$cid\t$cas\t$names[0]\n\n";
    }
    elsif ($req =~ /^\s*all_reactions\s*$/)
    {
	foreach $rid ($fig->all_reactions)
	{
	    print $fig->displayable_reaction($rid),"\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*ec_to_maps\s+(\S+)\s*$/)
    {
	print join("\n",$fig->ec_to_maps($1)),"\n\n";
    }
    elsif ($req =~ /^\s*map_to_ecs\s+(\S+)\s*$/)
    {
	print join("\n",$fig->map_to_ecs($1)),"\n\n";
    }
    elsif ($req =~ /^\s*map_name\s+(\S+)\s*$/)
    {
	print $fig->map_name($1),"\n\n";
    }
    elsif ($req =~ /^\s*add_annotation\s+(\S+)\s+(\S+)\s*$/)
    {
	$fid     = $1;
	$user    = $2;
	print "Type in annotation (end with \".\" at start of line)\n>> ";
	@ann = ();
	while (defined($_ = <STDIN>) && ($_ !~ /^\./))
	{
	    push(@ann,$_);
	    print ">> ";
	}
	print $fig->add_annotation($fid,$user,join("",@ann)),"\n\n";
    }
    elsif ($req =~ /^\s*h\s+(\S+)/)
    {
	if (-s "Help/$1")
	{
	    print "Sorry, we have not implemented the detailed help feature yet\n";
#	    @tmp = `cat Help/$1`;
#	    print "\n",join("",@tmp),"\n";
	}
	else
	{
	    print "sorry, no help for $1\n\n";
	}
    }
    elsif ($req =~ /^\s*verify_dir\s+(\S+)\s*$/)
    {
	$dir = $1;
	$fig->verify_dir($dir);
	print "$dir is now a directory\n";
    }
    elsif ($req =~ /^\s*ec_name\s+(\S+)\s*$/)
    {
	$ec= $1;
        print $fig->ec_name($ec),"\n";
    }
    elsif ($req =~ /^\s*all_roles\s*$/)
    {
	my @tmp = $fig->all_roles;
	foreach $_ (@tmp)
	{
	    print join("\t",@$_),"\n";
	}
	print "\n";
    }

    elsif ($req =~ /^\s*expand_ec\s+(\S+)\s*$/)
    {
	$ec = $1;
        print $fig->expand_ec($ec),"\n";
    }
    elsif ($req =~ /^\s*clean_tmp\s*$/)
    {
	$fig->clean_tmp;
	print "Cleaned $FIG_Config::temp\n";
    }
    elsif ($req =~ /^\s*org_of\s+(\S+)\s*$/)
    {
        $prot_id = $1;
	print $fig->org_of($prot_id),"\n";
    }
    elsif ($req =~ /^\s*abbrev\s+(\S.*\S)\s*$/)
    {
        $genome_name = $1;
	print $fig->abbrev($genome_name),"\n";;
    }
    elsif ($req =~ /^\s*ftype\s+(\S+)\s*$/)
    {
        $feature_id = $1;
	print $fig->ftype($feature_id),"\n";;
    }
    elsif ($req =~ /^\s*genome_of\s+(\S+)\s*$/)
    {
        $feature_id = $1;
	print $fig->genome_of($feature_id),"\n";
    }
    elsif ($req =~ /^\s*by_fig_id\s+(\S+)\s+(\S+)\s*$/)
    {
        $feature_id_a = $1;
        $feature_id_b = $2;
	print $fig->by_fig_id($feature_id_a,$feature_id_b),"\n";
    }
    elsif ($req =~ /^\s*close_genes\s+(\S+)\s+(\S+)\s*$/)
    {
        $feature_id = $1;
        $dist = $2;
	print join(",",$fig->close_genes($feature_id,$dist)),"\n";
    }
    elsif ($req =~ /^\s*pegs_of\s+(\S+)\s*$/)
    {
        $genome = $1;
	print join(",",$fig->pegs_of($genome)),"\n";
    }
    elsif ($req =~ /^\s*rnas_of\s+(\S+)\s*$/)
    {
        $genome = $1;
	my @tmp = $fig->rnas_of($genome);
	print &Dumper(\@tmp);
    }
    elsif ($req =~ /^\s*feature_aliases\s+(\S+)\s*$/)
    {
        $feature_id = $1;
	print join(",",$fig->feature_aliases($feature_id)),"\n";
    }
    elsif ($req =~ /^\s*by_alias\s+(\S+)\s*$/)
    {
        $alias = $1;
	print $fig->by_alias($alias);
    }
    elsif ($req =~ /^\s*possibly_truncated\s+(\S+)\s*$/)
    {
        $feature_id = $1;
	print $fig->possibly_truncated($feature_id),"\n";
    }
    elsif ($req =~ /^\s*is_real_feature\s+(\S+)\s*$/)
    {
        $feature_id = $1;
	print $fig->is_real_feature($feature_id),"\n";
    }
    elsif ($req =~ /^\s*translatable\s+(\S+)\s*$/)
    {
        $prot_id = $1;
	print $fig->translatable($prot_id),"\n";
    }
    elsif ($req =~ /^\s*maps_to_id\s+(\S+)\s*$/)
    {
        $id = $1;
	print $fig->maps_to_id($id),"\n";
    }
    elsif ($req =~ /^\s*translated_function_of\s+(\S+)\s+(\S+)\s*$/)
    {
        $peg = $1;
        $user = $2;
	print $fig->translated_function_of($peg,$user),"\n";
    }
    elsif ($req =~ /^\s*translate_function\s+(\S.*\S)\s*$/)
    {
        $func = $1;
	print $fig->translate_function($func),"\n";
    }
    elsif ($req =~ /^\s*hypo\s+(\S.*\S)\s*$/)
    {
	print $fig->hypo($1),"\n";
    }
    elsif ($req =~ /^\s*blastit\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/)
    {
        $peg = $1;
        $seq = $2;
        $db = $3;
        $maxP = $4;
	@tmp = $fig->blastit($peg,$seq,$db,$maxP);
	print &Dumper(\@tmp);
    }    
    elsif ($req =~ /^\s*related_by_func_sim\s+(\S+)\s+(\S+)\s*$/)
    {
        $peg = $1;
        $user = $2;
        print join(",",$fig->related_by_func_sim($peg,$user)),"\n";
    }
    elsif ($req =~ /^\s*epoch_to_readable\s*$/)
    {
       	print $fig->epoch_to_readable(time);
    }
    elsif ($req =~ /^\s*search_index\s+(\S+)\s*$/)
    {
        $pattern = $1;
	my @tmp = $fig->search_index($pattern);
	print &Dumper(\@tmp);
    }
    elsif ($req =~ /^\s*sz_family\s+(\S+)\s*$/)
    {
        $family = $1;
	print $fig->sz_family($family),"\n";
    }
    elsif ($req =~ /^\names_of_compound\s+(\S+)\s*$/)
    {
	my @tmp = $fig->names_of_compound($1);
	print &Dumper(\@tmp);
    }
    elsif ($req =~ /^\s*reversible\s+(\S+)\s*$/)
    {
        $rid = $1;
	print $fig->reversible($rid),"\n";
    }
    elsif ($req =~ /^\s*reaction2comp\s+(\S+)\s+(\S+)\s*$/)
    {
        $rid = $1;
        $which = $2;
	my @tmp = $fig->reaction2comp($rid,$which);
	print &Dumper(\@tmp);
    }
    elsif ($req =~ /^\s*displayable_reaction\s+(\S+)\s*$/)
    {
        $rid = $1;
	print $fig->displayable_reaction($rid),"\n";
    }
    elsif ($req =~ /^\s*all_maps\s*$/)
    {
       	my @tmp = $fig->all_maps;
	print &Dumper(\@tmp);
    }
    elsif ($req =~ /^\s*neighborhood_of_role\s+(\S+)\s*$/)
    {
        $role = $1;
	my @tmp = $fig->neighborhood_of_role($role);
	print &Dumper(\@tmp);
    }
    elsif ($req =~ /^\s*roles_of_function\s+(\S+)\s*$/)
    {
        $func = $1;
	my @tmp = $fig->roles_of_function($func);
	print &Dumper(\@tmp);
    }
    elsif ($req =~ /^\s*largest_clusters\s+(\S+)\s+(\S+)\s*$/)
    {
        $file = $1;
        $user = $2;
	my @tmp = `cat $file`;
	chop @tmp;;
	my @tmp1 = $fig->largest_clusters(\@tmp,$user);
	print &Dumper(\@tmp1);
    }
    elsif ($req =~ /^\s*unique_functions\s+(\S+)\s+(\S+)\s*$/)
    {
        $pegs = $1;
        $user = $2;
	my @tmp = $fig->unique_functions([split(/,/,$pegs)],$user);
	print &Dumper(\@tmp);
    }
    elsif ($req =~ /^\s*candidates_for_role\s+(\d+\.\d+)\s+(\S+)\s+(\S.*\S)\s*$/)
    {
	$genome = $1;
	$cutoff = $2;
	$role   = $3;
	my @tmp = $fig->candidates_for_role($role,$genome,$cutoff);
	foreach $peg (@tmp)
	{
	    print "$peg\t",scalar $fig->function_of($peg),"\n";
	}
	print "\n";
    }
    elsif ($req =~ /^\s*external_calls\s+(\S.*\S)\s*$/)
    {
	my @pegs = split(/[, \t]+/,$1);
	print join("\n",map { join("\t",@$_) } $fig->external_calls(\@pegs)),"\n";
	print "\n";
    }
    elsif ($req =~ /^\s*same_func\s+\'([^\']+)\'\s+\'([^\']+)\'\s*$/)
    {
	print $fig->same_func($1,$2),"\n";
	print "\n";
    }
    elsif ($req =~ /^\s*best_bbh_candidates\s+(\d+\.\d+)\s+(\S+)\s+(\d+)\s+(\S.*\S)\s*$/)
    {
	$genome = $1;
	$cutoff = $2;
	$requested = $3;
	$known     = [split(/[, \t]+/,$4)];
	
	my @tmp = $fig->best_bbh_candidates($genome,$cutoff,$requested,$known);
	foreach $_ (@tmp)
	{
	    print &Dumper($_);
	}
	print "\n";
    }
    elsif ($req =~ /^\s*extract_seq\s+(\S+)\s+(\S+)\s*$/)
    {
        $contigsF = $1;
        $loc = $2;
	$contigs  = &load_contigs($contigsF);
	print &Dumper($fig->extract_seq($contigs,$loc));
    }
    elsif ($req =~ /^\s*is_bacterial\s+(\S+)\s*$/)
    {
        $genome = $1;
        print $fig->is_bacterial($genome),"\n";;
    }
    elsif ($req =~ /^\s*is_archaeal\s+(\S+)\s*$/)
    {
        $genome = $1;
        print $fig->is_archaeal($genome),"\n";
    }
    elsif ($req =~ /^\s*is_prokaryotic\s+(\S+)\s*$/)
    {
        $genome = $1;
        print $fig->is_prokaryotic($genome),"\n";
    }
    elsif ($req =~ /^\s*is_eukaryotic\s+(\S+)\s*$/)
    {
        $genome = $1;
        print $fig->is_eukaryotic($genome),"\n";
    }
    elsif ($req =~ /^\s*sort_genomes_by_taxonomy\s+(\S+(\s+\S+)*)\s*$/)
    {
        @list_of_genomes = split(/\s+/,$1);
        print join(",",$fig->sort_genomes_by_taxonomy(@list_of_genomes)),"\n";
    }
    elsif ($req =~ /^\s*sort_fids_by_taxonomy\s+(\S+(\s+\S+)*)\s*$/)
    {
        @fids = split(/\s+/,$1);
        print join(",",$fig->sort_fids_by_taxonomy(@fids)),"\n";
    }
    elsif ($req =~ /^\s*build_tree_of_complete\s+(\S+)\s*$/)
    {
        $min_for_label = $1;
        print &Dumper($fig->build_tree_of_complete($min_for_label));
    }
    elsif ($req =~ /^\s*taxonomic_groups_of_complete\s+(\S+)\s*$/)
    {
        $min_for_labels = $1;
        print &Dumper($fig->taxonomic_groups_of_complete($min_for_labels));
    }
    else
    {
	print "invalid command\n";
    }
    print "\n";
    $req = "";

    if ($time_cmds)
    {
	$t2 = gettimeofday;
	print $t2-$t1," seconds to execute command\n\n";
    }
}
sub padded {
    my($x,$n) = @_;

    if (length($x) < $n)
    {
	return $x . (" " x ($n - length($x)));
    }
    return $x;
}

sub get_req {
    my($x);

    print "?? ";
    $x = <STDIN>;
    while (defined($x) && ($x =~ /^h$/i) )
    { 
	&help;
	print "?? ";
	$x = <STDIN>;
    }
    
    if ((! defined($x)) || ($x =~ /^\s*[qQxX]/))
    {
	return "";
    }
    else
    {
        if ($echo)
	{
	    print ">> $x\n";
	}
	return $x;
    }
}

sub load_contigs {
    my($file) = @_;
    my($id,$seq);

    my($contigs) = {};
    open(CONTIGS,"<$file") || die "could not open $file";
    $/ = "\n>";
    while (defined($_ = <CONTIGS>))
    {
	chomp;
	if ($_ =~ /^>?(\S+)[^\n]*\n(.*)/s)
	{
	    $id  =  $1;
	    $seq =  $2;
	    $seq =~ s/\s//g;
	    $contigs->{$id} = $seq;
	}
    }
    close(CONTIGS);
    $/ = "\n";
    return $contigs;
};


sub help {
    print <<END;
    DB                              Current DB
    abbrev                          genome_name
    access_sims                     [expand|func|expandfunc]       (for timeing - access 10 distinct sims)
    add_annotation                  FID User [ prompted for annotation; terminate with "." at start of line ]
    add_chromosomal_clusters        File
   *add_genome                      GenomeDir
    add_pch_pins                    File
    all_compounds               
    all_features                    GenomeID Type
    all_maps                 
    all_protein_families
    all_reactions
    all_roles
    all_sets                        Relation SetName
    assign_function                 PEG User [conf=X] Function
    assign_functionF                User File
    assignments_made                who date G1 G2 ...  [ none => all ]
    auto_assign                     PEG [Seq]
    auto_assignF                    User FileOfPEGs
    auto_assignG                    User GenomeID1 GenomeID2 ...
    bbhs                            PEG Cutoff
    between                         n1 n2 n3
    blast                           PEG  [against nr]
    blastit                         PEG seq db maxP
    boundaries_of                   Loc
    build_tree_of_complete          min_for_label   
    by_alias                        alias
    by_fig_id                       FID1 FID2
    candidates_for_role             Genome Cutoff Role
    cas                             CID
    cas_to_cid                      cas
    catalyzed_by                    RID
    catalyzes                       role
    cgi_url
    clean_tmp
    close_genes                     FID distance
    comp2react                      CID
    contig_ln                       GenomeID Contig
    coupling_and_evidence           FID Bound SimCutoff CouplingCutoff
    crude_estimate_of_distance      GenomeID1 GenomeID2
    delete_genomes                  G1 G2 G3 ...Gn
    displayable_reaction            RID
    dna_seq                         GenomeID Loc
    dsims                           FastaFile [MaxN MaxPsc Select]   *** select defaults to raw
    ec_to_maps                      EC
    ec_name                         EC
    expand_ec                       EC
    epoch_to_readable               [gives readable version of current time]
    export_chromosomal_clusters
    export_pch_pins
    export_set                      Relation SetName File
    exportable_subsystem            Subsystem
    external_calls                  PEG1 PEG2 PEG3...
    extract_seq                     ContigsFile loc 
    all_exchangable_subsystems
    best_bbh_candidates             Genome Cutoff Requested Known
    family_function                 Family
    fast_coupling                   FID Bound CouplingCutoff
    feature_aliases                 FID
    feature_annotations             FID
    feature_location                FID	
    file2N                          File
    ftype                           FID 
    function_of                     ID [all] [trans]
    genes_in_region                 GenomeID Contig Beg End 
    genome_of                       PEG
    genomes                         [complete|Pat]
    genome_counts                   [complete]
    genome_version                  GenomeID
    genus_species                   GenomeID
    get_translation                 ID
    get_translations                File [tab]
    h                               [command]  *** h h for help on how to use help ***
    hypo                            Function
    ids_in_family                   Family
    ids_in_set                      WhichSet Relation SetName
    in_cluster_with                 PEG
    in_family                       FID
    in_pch_pin_with                 FID
    in_sets                         Which Relation SetName
    is_archaeal                     GenomeID
    is_bacterial                    GenomeID
    is_eukaryotic                   GenomeID
    is_prokaryotic                  GenomeID
    is_exchangable_subsystem        Subsystem
    is_real_feature                 FID   
    largest_clusters                FileOfRoles user 
    load_all
    map_to_ecs                      map
    map_name                        map
    mapped_prot_ids                 ID
    maps_to_id                      ID 
    max                             n1 n2 n3 ...
    merged_related_annotations      PEG1 PEG2 ... PEGn
    min                             n1 n2 n3 ...
    names_of_compound
    neighborhood_of_role            role        
    org_of                          prot_id
    pegs_of                         GenomeID
    possibly_truncated              FID
    reaction2comp                   RID
    related_by_func_sim             PEG user
    reversible                      RID  
    rnas_of                         GenomeID
    roles_of_function               function
    same_func                       'function1'   'function2'
    search_index                    pattern
    seqs_with_role                  role who
    seqs_with_roles_in_genomes      genomes roles made_by
    sims                            PEG maxN maxP select
    sort_fids_by_taxonomy           FID1 FID2 FID3 ...
    sort_genomes_by_taxonomy        GenomeID1 GenomeID2 GenomeID3 ...
    sz_family                       family
    taxonomic_groups_of_complete    min_for_labels
    taxonomy_of                     GenomeID
    translatable                    prot_id
    translate_function              PEG user 
    translated_function_of          PEG user
    translation_length              ID
    unique_functions                PEGs user  [make the pegs comma separated]
    verify_dir                      dir
    
END
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3