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

Annotation of /FigKernelScripts/pegs_in_subsystem.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : overbeek 1.1 # -*- perl -*-
2 : olson 1.5 #
3 :     # Copyright (c) 2003-2006 University of Chicago and Fellowship
4 :     # for Interpretations of Genomes. All Rights Reserved.
5 :     #
6 :     # This file is part of the SEED Toolkit.
7 :     #
8 :     # The SEED Toolkit is free software. You can redistribute
9 :     # it and/or modify it under the terms of the SEED Toolkit
10 :     # Public License.
11 :     #
12 :     # You should have received a copy of the SEED Toolkit Public License
13 :     # along with this program; if not write to the University of Chicago
14 :     # at info@ci.uchicago.edu or the Fellowship for Interpretation of
15 :     # Genomes at veronika@thefig.info or download a copy from
16 :     # http://www.theseed.org/LICENSE.TXT.
17 :     #
18 :    
19 : overbeek 1.1 use Carp;
20 :     use Data::Dumper;
21 :    
22 : golsen 1.3 use strict;
23 :    
24 : overbeek 1.1 use FIG;
25 : golsen 1.3 my $fig = new FIG;
26 : overbeek 1.1
27 : overbeek 1.4 my $usage = "usage: pegs_in_subsystem Subsys [ all ] > ROLE-PEG\nThe 'all' parameter is required to include genomes without an operational variant\n\n";
28 : overbeek 1.1
29 : golsen 1.3 my ( $subsys, $all, $genomes, $role, $pair, $genome, $gs, @pegs, $peg );
30 : overbeek 1.1
31 : golsen 1.3 ( $subsys = shift @ARGV ) || die $usage;
32 :     $all = shift @ARGV;
33 : golsen 1.2
34 : golsen 1.3 $genomes = $fig->subsystem_genomes( $subsys, $all );
35 : golsen 1.2
36 : golsen 1.3 foreach $role ( $fig->subsystem_to_roles( $subsys ) )
37 : overbeek 1.1 {
38 : overbeek 1.6 next if ((! $all) && $fig->is_aux_role_in_subsystem($subsys,$role));
39 : golsen 1.3 foreach $pair ( @$genomes )
40 : overbeek 1.1 {
41 : golsen 1.3 ( $genome, $gs ) = @$pair;
42 :     foreach $peg ( $fig->pegs_in_subsystem_cell( $subsys, $genome, $role ) )
43 : overbeek 1.1 {
44 :     print "$role\t$peg\n";
45 :     }
46 :     }
47 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3