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

Diff of /FigKernelScripts/make_coreg_conjectures_based_on_subsys.pl

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

revision 1.3, Mon May 17 13:05:46 2010 UTC revision 1.4, Fri Jan 7 22:20:38 2011 UTC
# Line 3  Line 3 
3  use Carp;  use Carp;
4  use Data::Dumper;  use Data::Dumper;
5  use Statistics::Descriptive;  use Statistics::Descriptive;
6    use ExpressionDir;
7    
8  my($genome,$rawF);  my($expr_dir);
9  my $usage = "usage: make_coreg_conjectures_based_on_subsys Genome RawDataTab BadSubsystems";  my $usage = "usage: make_coreg_conjectures_based_on_subsys expr_dir";
10  (  (
11   ($genome    = shift @ARGV) &&   ($expr_dir   = shift @ARGV)
  ($rawF      = shift @ARGV)  
12  )  )
13      || die $usage;      || die $usage;
14    
15    my $exprO = ExpressionDir->new($expr_dir);
16    my $rawF = $exprO->expr_dir . "/rma_normalized.tab";
17    
18  my %bad_subsystems;  my %bad_subsystems;
19  if (@ARGV > 0)  if (@ARGV > 0)
20  {  {
21      map { $_ =~ /^(\S.*\S)/; $1 => 1 } `cat $ARGV[0]`;      map { $_ =~ /^(\S.*\S)/; $1 => 1 } `cat $ARGV[0]`;
22  }  }
23    
24  my $sapO    = SAPserver->new;  #my $sapO    = SAPserver->new;
25    
26  my $corrH = &get_corr($rawF);  my $corrH = &get_corr($rawF);
27    
28  my $genomeH = $sapO->genomes_to_subsystems( -ids => [$genome] );  #my $genomeH = $sapO->genomes_to_subsystems( -ids => [$genome] );
29  my @subs = map { ($_->[1] =~ /^\*?(0|-1)$/) ? () : $_->[0] } @{$genomeH->{$genome}};  #my @subs = map { ($_->[1] =~ /^\*?(0|-1)$/) ? () : $_->[0] } @{$genomeH->{$genome}};
30  @subs = grep { ! $bad_subsystems{$_} } @subs;  #@subs = grep { ! $bad_subsystems{$_} } @subs;
31    
32    #my $subH = $sapO->ids_in_subsystems( -subsystems => \@subs,
33    #                                    -genome     => $genome);
34    my $subH = $exprO->ids_in_subsystems();
35    my @subs = keys %$subH;
36    
 my $subH = $sapO->ids_in_subsystems( -subsystems => \@subs,  
                                      -genome     => $genome);  
37  my %bad;  my %bad;
38    
39  foreach my $sub (@subs)  foreach my $sub (@subs)
40  {  {
41      my %pegs;      my %pegs;

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3