[Bio] / FortyEight / create_import_job.pl Repository:
ViewVC logotype

Diff of /FortyEight/create_import_job.pl

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

revision 1.3, Tue Sep 25 01:14:57 2007 UTC revision 1.4, Fri Oct 5 17:23:57 2007 UTC
# Line 28  Line 28 
28  use Job48;  use Job48;
29  use NRTools;  use NRTools;
30    
31  my $usage = "create_import_job prev-nr prev-syn prev-sims";  my $usage = "create_import_job [-import-biodb] [-from-job jobnum] [prev-nr prev-syn prev-sims]";
32    
33  #  #
34  # Incoming NR data.  # Incoming NR data.
35  #  #
36  my $dir_biodb = "/vol/biodb";  my $dir_biodb = "/vol/biodb";
37  #my $dir_biodb_nr_input = "$dir_biodb/processed_data/for_build_nr";  my $dir_biodb_nr_input = "$dir_biodb/processed_data/for_build_nr";
 my $dir_biodb_nr_input = "/local/FIGdisk/FIG/Data/NR";  
   
38    
39  #  #
40  # Existing SEED data  # Existing SEED data
# Line 55  Line 53 
53  # Startup.  # Startup.
54  #  #
55    
56    my $do_biodb_import;
57    my $from_job_id;
58    
59    while ((@ARGV > 0) && ($ARGV[0] =~ /^-/))
60    {
61        my $arg = shift @ARGV;
62        if ($arg =~ /^-import-biodb/i)
63        {
64            $do_biodb_import++;
65        }
66        elsif ($arg =~ /^-from-job/)
67        {
68            $from_job_id = shift @ARGV;
69        }
70        else
71        {
72            die $usage;
73        }
74    }
75    
76    my $prev_nr_src;
77    my $prev_syn_src;
78    my $prev_sim_dir;
79    my $from_job;
80    
81    if (defined($from_job_id))
82    {
83        @ARGV == 0 or die $usage;
84    
85        $from_job = ImportJob->new($from_job_id);
86        $from_job or die "From-job id $from_job_id does not exist";
87    
88        my $dir = $from_job->dir();
89        $prev_nr_src = "$dir/nr";
90        $prev_syn_src = "$dir/peg.synonyms";
91        $prev_sim_dir = sprintf("$dir/Sims.%03d", $from_job_id);
92    }
93    else
94    {
95  @ARGV == 3 or die $usage;  @ARGV == 3 or die $usage;
96    
97  my $prev_nr_src = shift;      $prev_nr_src = shift;
98  my $prev_syn_src = shift;      $prev_syn_src = shift;
99  my $prev_sim_dir = shift;      $prev_sim_dir = shift;
100    }
101    
102  #  #
103  # Validate  # Validate
# Line 99  Line 137 
137  }  }
138    
139    
140    print "Creating import job\n";
141    print "\tprev_nr=$prev_nr_src\n";
142    print "\tprev_syn=$prev_syn_src\n";
143    print "\tprev_sim=$prev_sim_dir\n";
144    
145  #  #
146  # Initial validation.  # Initial validation.
147  #  #
148  &validate_dirs($dir_biodb_nr_input, $dir_reference_seed_data, $dir_rast_jobs);  &validate_dirs($dir_biodb_nr_input, $dir_reference_seed_data, $dir_rast_jobs);
149    
150    if ($do_biodb_import)
151    {
152        &validate_dirs($dir_biodb_nr_input);
153    }
154    
155  #  #
156  # Create our jobdir.  # Create our jobdir.
157  #  #

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3