[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.6, Fri Dec 19 20:09:34 2003 UTC revision 1.7, Sat Dec 20 21:08:43 2003 UTC
# Line 32  Line 32 
32      }      }
33  }  }
34    
35    sub delete_genomes {
36        my($self,$genomes) = @_;
37        my $tmpD     = "$FIG_Config::temp/tmp.deleted.$$";
38        my $tmp_Data = "$FIG_Config::temp/Data.$$";
39    
40        my %to_del = map { $_ => 1 } @$genomes;
41        open(TMP,">$tmpD") || die "could not open $tmpD";
42    
43        my $genome;
44        foreach $genome ($self->genomes)
45        {
46            if (! $to_del{$genome})
47            {
48                print TMP "$genome\n";
49            }
50        }
51        close(TMP);
52    
53        &run("extract_genomes $tmpD $FIG_Config::data $tmp_Data");
54        &run("mv $FIG_Config::data $FIG_Config::data.deleted; mv $tmp_Data $FIG_Config::data; fig load_all; rm -rf $FIG_Config::data.deleted");
55    }
56    
57    
58  sub add_genome {  sub add_genome {
59      my($self,$genomeF) = @_;      my($self,$genomeF) = @_;
60    
61      my $rc = 0;      my $rc = 0;
62      if ($genomeF =~ /((.*\/)?(\d+\.\d+))$/)      if (($genomeF =~ /((.*\/)?(\d+\.\d+))$/) && (! -d "$FIG_Config::organisms/$3"))
63      {      {
64          my $genome = $3;          my $genome = $3;
65          my @errors = `$FIG_Config::bin/verify_genome_directory $genomeF`;          my @errors = `$FIG_Config::bin/verify_genome_directory $genomeF`;
# Line 52  Line 75 
75                  &run("index_translations $genome");                  &run("index_translations $genome");
76                  my @tmp = `cut -f1 $FIG_Config::organisms/$genome/Features/peg/tbl`;                  my @tmp = `cut -f1 $FIG_Config::organisms/$genome/Features/peg/tbl`;
77                  chop @tmp;                  chop @tmp;
78  #               &run("cat $FIG_Config::organisms/$genome/Features/peg/fasta >> $FIG_Config::data/Global/nr");                  &run("cat $FIG_Config::organisms/$genome/Features/peg/fasta >> $FIG_Config::data/Global/nr");
79  #               &make_similarities(\@tmp);                  &make_similarities(\@tmp);
80              }              }
81              if ((-s "$FIG_Config::organisms/$genome/assigned_functions") ||              if ((-s "$FIG_Config::organisms/$genome/assigned_functions") ||
82                  (-d "$FIG_Config::organisms/$genome/UserModels"))                  (-d "$FIG_Config::organisms/$genome/UserModels"))

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3