[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.3, Mon May 9 02:33:25 2005 UTC revision 1.4, Thu May 12 20:38:37 2005 UTC
# Line 3  Line 3 
3  use FIG;  use FIG;
4  my $fig = new FIG;  my $fig = new FIG;
5    
6  $usage = "usage: make_PHOBs_for_subsystems Dir < FileOf_SS-Role-PEG-Func";  $usage = "usage: make_PHOBs_for_subsystems Dir [SimilarityCutoff FracCoverage] < FileOf_SS-Role-PEG-Func";
7    
8  (  (
9   ($dir = shift @ARGV) && (! -d $dir)   ($dir = shift @ARGV) && (! -d $dir)
10  )  )
11      || die $usage;      || die $usage;
12    
13    if (@ARGV == 2)
14    {
15        $sim_cutoff = shift @ARGV;
16        $frac_cov   = shift @ARGV;
17    }
18    
19  mkdir($dir,0777) || die "could not make $dir";  mkdir($dir,0777) || die "could not make $dir";
20  while (defined($_ = <STDIN>))  while (defined($_ = <STDIN>))
21  {  {
# Line 33  Line 39 
39      foreach $role (sort keys(%{$subH{$ss}}))      foreach $role (sort keys(%{$subH{$ss}}))
40      {      {
41          ++$roleN;          ++$roleN;
         print INDEXR "$roleN\t$role\n";  
42    
43          $pegs = $subH{$ss}->{$role};          $pegs = $subH{$ss}->{$role};
44          if (@$pegs < 4)          if (@$pegs < 8)
45          {          {
46              print STDERR "Skipping $dir/$ssN/$roleN, role $role --- only ", (scalar @$pegs), " pegs\n";              print STDERR "Skipping $dir/$ssN/$roleN, role $role --- only ", (scalar @$pegs), " pegs\n";
47              next;              next;
48          }          }
49    
50            print INDEXR "$roleN\t$role\n";
51    
52          open(TMP,">$tmpF") || die "could not open $tmpF";          open(TMP,">$tmpF") || die "could not open $tmpF";
53          foreach $peg (@$pegs)          foreach $peg (@$pegs)
54          {          {
# Line 57  Line 64 
64          close(TMP);          close(TMP);
65    
66          mkdir("$dir/$ssN/$roleN",0777) || die "could not make $dir/$ssN/$roleN";          mkdir("$dir/$ssN/$roleN",0777) || die "could not make $dir/$ssN/$roleN";
67          &FIG::run("split_and_trim_sequences $dir/$ssN/$roleN/split_info < $tmpF");          &FIG::run("split_and_trim_sequences $dir/$ssN/$roleN/split_info $sim_cutoff $frac_cov < $tmpF");
68    
69          if (-s "$dir/$ssN/$roleN/split_info/set.sizes")          if (-s "$dir/$ssN/$roleN/split_info/set.sizes")
70          {          {

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3