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

Diff of /FigKernelScripts/process_new_sims.pl

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

revision 1.4, Mon Dec 5 18:56:38 2005 UTC revision 1.5, Thu Feb 1 20:01:49 2007 UTC
# Line 17  Line 17 
17    
18  use FIG;  use FIG;
19    
20  $usage = "usage: process_new_sims NR peg.synonyms SimsDir Prefix EnhancedSimsDir";  $usage = "usage: process_new_sims [-timelogic] NR peg.synonyms SimsDir Prefix EnhancedSimsDir";
21    
22    my $timelogic;
23    while ($ARGV[0] =~ /^-/)
24    {
25        $opt = shift;
26        if ($opt eq '-timelogic')
27        {
28            $timelogic++;
29        }
30        else
31        {
32            die "Invalid option $opt\n";
33        }
34    }
35    
36  (  ($nr  = shift @ARGV) && (-s $nr)  (  ($nr  = shift @ARGV) && (-s $nr)
37  && ($syn = shift @ARGV) && (-s $syn)  && ($syn = shift @ARGV) && (-s $syn)
# Line 38  Line 52 
52          chomp;          chomp;
53          s/^\s*//;          s/^\s*//;
54          s/\s*$//;          s/\s*$//;
55          -d $_ or die "Sims directory $_ does not exist\n";  
56          push(@dir_list, $_);          my @l = split(/\s+/, $_);
57            for my $d (@l)
58            {
59                -d $d or die "Sims directory $d does not exist\n";
60                push(@dir_list, $d);
61            }
62      }      }
63  }  }
64  else  else
# Line 64  Line 83 
83  printf "Processing %d files\n", int(@to_process);  printf "Processing %d files\n", int(@to_process);
84  (-d $to_dir) || mkdir($to_dir,0777) || die "could not make $to_dir";  (-d $to_dir) || mkdir($to_dir,0777) || die "could not make $to_dir";
85    
86  open(OUT, "| reduce_sims $syn 300 | reformat_sims $nr | split_sims $to_dir $prefix")  my $pipeline;
87    if ($timelogic)
88    {
89        $pipeline = "reformat_timelogic_sims | ";
90    }
91    
92    $pipeline .= "reduce_sims $syn 300 | reformat_sims $nr | split_sims $to_dir $prefix";
93    
94    open(OUT, "| $pipeline")
95      || die "could not open output pipeline";      || die "could not open output pipeline";
96    
97  foreach $file (@to_process)  foreach $file (@to_process)

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3