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

Annotation of /FigKernelScripts/clean_subsystems.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : overbeek 1.1
2 :     #
3 :     # Input to this tool is usually produced using something like
4 :     #
5 :     # pegs_in_conflict trusted.subsystems | peg_to_subsystems > conflicted.pegs
6 :     #
7 :     # Then running
8 :     #
9 :     # clean_subsystems < conflicted.pegs; index_subsystems
10 :     #
11 :     # should remove the offending PEGs from their subsystems.
12 :     #
13 :    
14 :    
15 :     use FIG;
16 :     my $fig = new FIG;
17 :    
18 :     use Subsystem;
19 :    
20 :     while (defined($_ = <STDIN>))
21 :     {
22 :     chop;
23 :     ($peg,$func,$ssa,$role) = split(/\t/,$_);
24 :     @roles = $fig->roles_of_function($func);
25 :     for ($i=0; ($i < @roles) && ($roles[$i] ne $role); $i++) {}
26 :     if ($i == @roles)
27 :     {
28 :     my $subsystem = new Subsystem($ssa,$fig,0);
29 :     $genome = &FIG::genome_of($peg);
30 :     @pegs1 = sort $subsystem->get_pegs_from_cell($genome,$role);
31 :     @pegs2 = grep { $_ ne $peg } @pegs1;
32 :     if (@pegs2 == @pegs1)
33 :     {
34 :     print STDERR "BAD: ",&Dumper(\@pegs1,\@pegs2,$ssa,$peg,$role,$func);
35 :     }
36 :     else
37 :     {
38 :     $subsystem->set_pegs_in_cell($genome,$role,\@pegs2);
39 :     $subsystem->write_subsystem();
40 :     }
41 :     }
42 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3