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

Diff of /FigKernelScripts/make_PHOBs_for_subsystems.pl

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

revision 1.1, Tue May 3 00:09:39 2005 UTC revision 1.3, Mon May 9 02:33:25 2005 UTC
# Line 1  Line 1 
1    # -*- perl -*-
2    
3  use FIG;  use FIG;
4  my $fig = new FIG;  my $fig = new FIG;
# Line 35  Line 36 
36          print INDEXR "$roleN\t$role\n";          print INDEXR "$roleN\t$role\n";
37    
38          $pegs = $subH{$ss}->{$role};          $pegs = $subH{$ss}->{$role};
39            if (@$pegs < 4)
40            {
41                print STDERR "Skipping $dir/$ssN/$roleN, role $role --- only ", (scalar @$pegs), " pegs\n";
42                next;
43            }
44    
45          open(TMP,">$tmpF") || die "could not open $tmpF";          open(TMP,">$tmpF") || die "could not open $tmpF";
46          foreach $peg (@$pegs)          foreach $peg (@$pegs)
47          {          {
# Line 52  Line 59 
59          mkdir("$dir/$ssN/$roleN",0777) || die "could not make $dir/$ssN/$roleN";          mkdir("$dir/$ssN/$roleN",0777) || die "could not make $dir/$ssN/$roleN";
60          &FIG::run("split_and_trim_sequences $dir/$ssN/$roleN/split_info < $tmpF");          &FIG::run("split_and_trim_sequences $dir/$ssN/$roleN/split_info < $tmpF");
61    
62          open(SZ,"<$dir/$ssN/$roleN/split_info/set.sizes") || die " could not open $dir/$ssN/$roleN/split_info";          if (-s "$dir/$ssN/$roleN/split_info/set.sizes")
63            {
64                open(SZ,"<$dir/$ssN/$roleN/split_info/set.sizes") || die " could not open $dir/$ssN/$roleN/split_info/set.sizes";
65          while (defined($_ = <SZ>))          while (defined($_ = <SZ>))
66          {          {
67              if (($_ =~ /^(\d+)\t(\d+)/) && ($2 > 3))              if (($_ =~ /^(\d+)\t(\d+)/) && ($2 > 3))
# Line 63  Line 72 
72          }          }
73          close(SZ);          close(SZ);
74      }      }
75            else
76            {
77                system("rmdir $dir/$ssN/$roleN") && warn "Could not rmdir $dir/$ssN/$roleN";
78                print STDERR "Skipping role $role in $dir/$ssN/$roleN\n";
79            }
80        }
81      close(INDEXR);      close(INDEXR);
82  }  }
83  close(INDEXSS);  close(INDEXSS);

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3