[Bio] / FigKernelPackages / FIG.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.pm

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

revision 1.330, Wed Aug 3 21:16:29 2005 UTC revision 1.331, Wed Aug 3 23:00:37 2005 UTC
# Line 306  Line 306 
306    
307  =head3 add_genome  =head3 add_genome
308    
309  C<< my $ok = $fig->add_genome($genomeF); >>  C<< my $ok = $fig->add_genome($genomeF, $force); >>
310    
311  Add a new genome to the data store. A genome's data is kept in a directory  Add a new genome to the data store. A genome's data is kept in a directory
312  by itself, underneath the main organism directory. This method essentially  by itself, underneath the main organism directory. This method essentially
# Line 321  Line 321 
321  fully-qualified directory name. The last segment of the directory  fully-qualified directory name. The last segment of the directory
322  name should be the genome ID.  name should be the genome ID.
323    
324    =item force
325    
326    This will ignore errors thrown by verify_genome_directory. This is bad, and you should
327    never do it, but I am in the situation where I need to move a genome from one machine
328    to another, and although I trust the genome I can't.
329    
330  =item RETURN  =item RETURN
331    
332  Returns TRUE if successful, else FALSE.  Returns TRUE if successful, else FALSE.
# Line 330  Line 336 
336  =cut  =cut
337  #: Return Type $;  #: Return Type $;
338  sub add_genome {  sub add_genome {
339      my($self,$genomeF) = @_;      my($self,$genomeF, $force) = @_;
340    
341      my $rc = 0;      my $rc = 0;
342    
# Line 356  Line 362 
362      if (@errors) {      if (@errors) {
363          warn "Errors found while verifying genome directory $genomeF:\n";          warn "Errors found while verifying genome directory $genomeF:\n";
364          print join("", @errors);          print join("", @errors);
365          return $rc;          if (!$force) {return $rc}
366            else {warn "Skipped these errors and continued. You should not do this"}
367      }      }
368    
369      &run("cp -r $genomeF $FIG_Config::organisms");      &run("cp -r $genomeF $FIG_Config::organisms");

Legend:
Removed from v.1.330  
changed lines
  Added in v.1.331

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3