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

Diff of /FigKernelScripts/svr_is_hypo.pl

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

revision 1.2, Thu Apr 7 15:25:56 2011 UTC revision 1.3, Thu Apr 7 22:11:18 2011 UTC
# Line 19  Line 19 
19    
20  would produce a 1-column table containing the hypotheticals in 3702.1  would produce a 1-column table containing the hypotheticals in 3702.1
21    
22    Normally, a stream of feature IDs (PEGs) is used as input.  If the things you send
23    through do not look like PEGs, then they are treated as functional roles.
24    
25  ------  ------
26    
27  The standard input should be a tab-separated table (i.e., each line  The standard input should be a tab-separated table (i.e., each line
# Line 66  Line 69 
69  my @lines = map { chomp; [split(/\t/,$_)] } <STDIN>;  my @lines = map { chomp; [split(/\t/,$_)] } <STDIN>;
70  (@lines > 0) || exit;  (@lines > 0) || exit;
71  if (! $column)  { $column = @{$lines[0]} }  if (! $column)  { $column = @{$lines[0]} }
72  my @fids = map { $_->[$column-1] } @lines;  my @fids = grep { $_ =~ /^fig\|/ } map { $_->[$column-1] } @lines;
73    
74  my $functions = $sapObject->ids_to_functions(-ids => \@fids);  my $functions = $sapObject->ids_to_functions(-ids => \@fids);
75  foreach $_ (@lines)  foreach $_ (@lines)
76  {  {
77      my $func = $functions->{$_->[$column-1]};      my $thing = $_->[$column-1];
78        my $func;
79        if ($thing =~ /^fig\|/)
80        {
81            $func = $functions->{$thing};
82        }
83        else
84        {
85            $func = $thing;
86        }
87      my $hypo = &SeedUtils::hypo($func);      my $hypo = &SeedUtils::hypo($func);
88      if (((! $v) && $hypo) || ($v && (! $hypo)))      if (((! $v) && $hypo) || ($v && (! $hypo)))
89      {      {

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3