[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.2, Thu Sep 13 19:57:11 2007 UTC revision 1.3, Tue Sep 25 01:14:57 2007 UTC
# Line 42  Line 42 
42  # Existing SEED data  # Existing SEED data
43  #  #
44    
45  #my $dir_reference_seed_data = "/vol/seed-data-anno-mirror/Data.Jan3";  my $dir_reference_seed_data = "/vol/seed-data-anno-mirror/Data.Jan3";
46  my $dir_reference_seed_data = "/local/FIGdisk/FIG/Data";  #my $dir_reference_seed_data = "/local/FIGdisk/FIG/Data";
47    
48  #  #
49  # RAST server from which to pull genomes to import.  # RAST server from which to pull genomes to import.
# Line 92  Line 92 
92      die "Cannot open previous synonyms file $prev_syn_src: $!\n";      die "Cannot open previous synonyms file $prev_syn_src: $!\n";
93  }  }
94    
95  if (not(-d $prev_sim_dir and <$prev_sim_dir/sims*> > 0))  my @sfiles = <$prev_sim_dir/sims*>;
96    if (not(-d $prev_sim_dir and @sfiles > 0))
97  {  {
98      die "previous sim dir $prev_sim_dir does not appear to contain sims\n";      die "previous sim dir $prev_sim_dir does not appear to contain sims\n";
99  }  }
# Line 169  Line 170 
170  # will be used later during the installation of these jobs into the SEED.  # will be used later during the installation of these jobs into the SEED.
171  #  #
172    
173  open(JOBS, ">jobdir/rast.jobs") or die "Cannot create $jobdir/rast.jobs: $!";  open(JOBS, ">$jobdir/rast.jobs") or die "Cannot create $jobdir/rast.jobs: $!";
174    
175  my @rast_jobs;  my @rast_jobs;
176  scan_rast_jobs(\@rast_jobs, $dir_rast_jobs);  scan_rast_jobs(\@rast_jobs, $dir_rast_jobs);
177    
178    my @new_rast_jobs;
179  for my $job (@rast_jobs)  for my $job (@rast_jobs)
180  {  {
181      my $gid = $job->genome_id;      my $gid = $job->genome_id;
# Line 182  Line 184 
184    
185      print "RAST job #$j: $gid $gname\n";      print "RAST job #$j: $gid $gname\n";
186    
     print JOBS $job->dir(), "\n";  
   
187      if (exists($NR_dirs{$gid}))      if (exists($NR_dirs{$gid}))
188      {      {
189          die "Rast job $j already exists in SEED server\n";          warn "Rast job $j already exists in SEED server\n";
190            next;
191      }      }
192        push(@new_rast_jobs, $job);
193    
194        print JOBS $job->dir(), "\n";
195    
196      my $fasta = $job->orgdir() . "/Features/peg/fasta";      my $fasta = $job->orgdir() . "/Features/peg/fasta";
197      -f $fasta or die "Job $j has no fasta file in $fasta\n";      -f $fasta or die "Job $j has no fasta file in $fasta\n";
# Line 195  Line 199 
199                              fasta_path => $fasta, size => -s _ };                              fasta_path => $fasta, size => -s _ };
200  }  }
201  close(JOBS);  close(JOBS);
202    @rast_jobs = @new_rast_jobs;
203    
204  open(F, ">$jobdir/all.nr.dirs");  open(F, ">$jobdir/all.nr.dirs");
205  open(F2, ">$jobdir/nr.sources");  open(F2, ">$jobdir/nr.sources");

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3