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

Diff of /FigKernelScripts/svr_pegs_in_subsystems.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3, Wed Oct 7 21:04:43 2009 UTC revision 1.4, Tue Oct 20 20:22:08 2009 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    
 use LWP;  
 use Data::Dumper;  
3  use SSserver;  use SSserver;
4  use Getopt::Long;  use Getopt::Long;
5    
   
6  # This is a SAS Component  # This is a SAS Component
7    
8    =head1 svr_pegs_in_subsystems
9    
10    Return all genes in one or more subsystems found in one or more genomes.
11    
12    This script takes a list of genomes and a list of subsystems and returns a list
13    of the genes represented in each genome/subsystem pair. It takes one positional
14    parameter-- the name of the file containing the genome IDs, and reads the list
15    of subsystem IDs from the standard input.
16    
17    The standard output will be a tab-delimited file, each record containing a
18    subsystem ID, a functional role in that subsystem, and the ID of a gene with
19    that role from one of the supplied genomes.
20    
21    This is a pipe command. The input is from the standard input and the output is
22    to the standard output.
23    
24    The following command-line options are supported.
25    
26    =over 4
27    
28    =item group
29    
30    If specified, then each output line will be for a single role, and the gene IDs will
31    be listed as a single comma-delimited string.
32    
33    =item noroles
34    
35    If specified, then the second column in each output line (functional role) will be
36    omitted from the output.
37    
38    =back
39    
40    =cut
41    
42  my $noroles = 0;  my $noroles = 0;
43  my $group = 0;  my $group = 0;
# Line 24  Line 54 
54      die "\n   usage: $usage\n\n";      die "\n   usage: $usage\n\n";
55  }  }
56    
   
57  my $roles = $noroles ? 0 : 1;  my $roles = $noroles ? 0 : 1;
58  my $ss = SSserver->new();  my $ss = SSserver->new();
59    
# Line 41  Line 70 
70          push (@subs, $_);          push (@subs, $_);
71  }  }
72    
73  my $pegs_inss = $ss->pegs_in_subsystem(\@genomes, \@subs);  my $pegs_inss = $ss->pegs_in_subsystems(\@genomes, \@subs);
74  if ($roles) {  if ($roles) {
75          foreach my $ss_role (@{$pegs_inss}) { #foreach subsystem/role          foreach my $ss_role (@{$pegs_inss}) { #foreach subsystem/role
76                  #(ss, role, (peg))                  #(ss, role, (peg))
# Line 72  Line 101 
101          }          }
102  }  }
103    
 exit;  
   

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3