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

View of /FigKernelScripts/FFB2_families_in_subsystems.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Fri Oct 29 17:10:34 2010 UTC (9 years, 5 months ago) by olson
Branch: MAIN
CVS Tags: mgrast_dev_08112011, mgrast_dev_08022011, rast_rel_2014_0912, myrast_rel40, mgrast_dev_05262011, mgrast_dev_04082011, mgrast_version_3_2, mgrast_dev_12152011, mgrast_dev_06072011, rast_rel_2014_0729, mgrast_dev_02212011, rast_rel_2010_1206, mgrast_release_3_0, mgrast_dev_03252011, rast_rel_2011_0119, 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, mgrast_dev_04012011, myrast_33, rast_rel_2011_0928, mgrast_dev_04052011, mgrast_dev_02222011, mgrast_dev_10262011, HEAD
Update to FF processing

#
# Emit the list of functional roles showing up in
# the families that exist in the (current) set of subsystems.
#

$ENV{SAP_SERVER} = 'PSEED';
use SAPserver;
use SeedUtils;

@ARGV == 1 or die "Usage: $0 family.functions\n";

my $fam = shift;

open(F, "<", $fam) or die "cannot open family.functions file $fam: $!";

my $sap = SAPserver->new();

my $ss_names = $sap->subsystem_names();
my $roles = $sap->subsystem_roles(-ids => $ss_names);

my %roles;

for my $ent (values %$roles)
{
    $roles{$_} = 1 for @$ent;
}
my @c = keys %roles;
my $n = @c;
my %seen;
my $id = 1;
while (<F>)
{
    chomp;
    my($fam, $func) = split(/\t/);
    my @froles = SeedUtils::roles_of_function($func);
    for my $frole (@froles)
    {
	$frole = SeedUtils::strip_func_comment($frole);
	next if $seen{$frole};
	$seen{$frole} = 1;
	if ($roles{$frole})
	{
	    print "$id\t$frole\t$fam\n";
	    $id++;
	}
	else
	{
	    print STDERR "$frole\t$fam\n";
	}
    }
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3