[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.665, Thu Feb 28 19:12:37 2008 UTC revision 1.666, Fri Feb 29 21:12:45 2008 UTC
# Line 4048  Line 4048 
4048    return $relational_db_response;    return $relational_db_response;
4049  }  }
4050    
4051    =head3 genome_info
4052    
4053        my $info = $fig->genome_info();
4054    
4055    Return an array reference of information from the genome table
4056    
4057    =over 4
4058    
4059    =item RETURN
4060    
4061    This will return an array reference of genome table entries. All entries of the table will be
4062    returned. The columns will be the following:
4063    
4064    genome, gname, szdna, maindomain, pegs, rnas, complete
4065    
4066    =back
4067    
4068    =cut
4069    
4070    sub genome_info {
4071        my ($self) = @_;
4072        my $rdbH = $fig->db_handle;
4073        return $rdbH->SQL("SELECT genome, gname, szdna, maindomain, pegs, rnas, complete FROM genome");
4074    }
4075    
4076  =head3 is_complete  =head3 is_complete
4077    
4078      my $flag = $fig->is_complete($genome);      my $flag = $fig->is_complete($genome);
# Line 10768  Line 10793 
10793              flock(TMP,LOCK_EX) || confess "cannot lock annotations";              flock(TMP,LOCK_EX) || confess "cannot lock annotations";
10794              seek(TMP,0,2)      || confess "failed to seek to the end of the file";              seek(TMP,0,2)      || confess "failed to seek to the end of the file";
10795    
10796                # Tweaked this section for Windows compatability. The siz     if (open(TMP,">>$file"))
10797            {
10798                flock(TMP,LOCK_EX) || confess "cannot lock annotations";
10799                seek(TMP,0,2)      || confess "failed to seek to the end of the file";
10800    
10801              # Tweaked this section for Windows compatability. The size on disk of              # Tweaked this section for Windows compatability. The size on disk of
10802              # "\n" is not constant.              # "\n" is not constant.
10803              my $seek1 = tell TMP;              my $seek1 = tell TMP;
# Line 11375  Line 11405 
11405    
11406      if (! defined($genomes)) { $genomes = [$self->genomes] }      if (! defined($genomes)) { $genomes = [$self->genomes] }
11407    
11408      my %genomes = map { $_ => 1 } @$genomes;      my %gen$epoch_date = $date;
     if ($date =~ /^(\d{1,2})\/(\d{1,2})\/(\d{4})$/)  
     {  
         my($mm,$dd,$yyyy) = ($1,$2,$3);  
         $epoch_date = &Time::Local::timelocal(0,0,0,$dd,$mm-1,$yyyy-1900,0,0,0);  
     }  
     elsif ($date =~ /^\d+$/)  
     {  
         $epoch_date = $date;  
11409      }      }
11410      else      else
11411      {      {

Legend:
Removed from v.1.665  
changed lines
  Added in v.1.666

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3