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

Annotation of /FigKernelScripts/figfam_subsystems.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (view) (download) (as text)

1 : arodri7 1.1 #!/usr/bin/env /home/arodri7/FIGdisk/bin/run_perl
2 :    
3 :     use Data::Dumper;
4 :     use Carp;
5 :     use FIG_Config;
6 :     use FIG;
7 : arodri7 1.2 use FF;
8 : arodri7 1.1
9 :     my $usage = "figfam_subsystems $famsDirectory\n";
10 :     my $famsD = $ARGV[0];
11 :    
12 :     use FigFams;
13 :     my $fig = new FIG;
14 :     my $figfams = new FigFams($fig,$famsD);
15 :    
16 :     open (FH, "$famsD/family.functions");
17 :     while (my $line = <FH>){
18 :     next if ($line =~ /not subsystem-based/);
19 :     chomp ($line);
20 :     my ($fam_id, $function) = split(/\t/, $line);
21 : arodri7 1.2 my $ff_obj = new FF($fam_id,$famsD);
22 :     my $subs={};
23 :     foreach my $id (@{$ff_obj->pegs_of})
24 :     {
25 :     my @subs1 = $fig->subsystems_for_peg($id);
26 :     my $count = scalar (@{$subs1[0]});
27 :     my $i=0;
28 :     foreach my $sub (@{$subs1[0]})
29 :     {
30 :     last if ($count-1 == $i);
31 :     $subs->{$sub}++;
32 :     $i++;
33 :     }
34 :     }
35 :     my @subsystems = keys %$subs;
36 :     if (scalar @subsystems > 0)
37 :     {
38 :     #print join ("\t", ($fam_id, $function, $fig->function_to_subsystems($function))) . "\n" if (! $fig->function_to_subsystems($function));
39 :     print join ("\t", ($fam_id, $function, @subsystems)) . "\n";
40 :     }
41 : arodri7 1.1 }
42 :     close FH;
43 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3