[Bio] / FigKernelScripts / pg_add_genomes.pl Repository:
ViewVC logotype

Annotation of /FigKernelScripts/pg_add_genomes.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download) (as text)

1 : overbeek 1.1 use strict;
2 :     use Data::Dumper;
3 :     use Getopt::Long;
4 :    
5 :     my $usage = "usage: pg_add_genomes -d Data\n";
6 :     my $dataD;
7 :    
8 :     my $rc = GetOptions('d=s' => \$dataD);
9 :     if ((! $rc) || (! -d $dataD)) { print STDERR $usage; exit }
10 :    
11 :     open(OUT,">$dataD/genomes.with.job.and.genomeID")
12 :     || die "could not open $dataD/genomes.with.job.and.genomeID";
13 :    
14 :     foreach $_ (`cat $dataD/genomes.with.job`)
15 :     {
16 :     chop;
17 :     my @flds = split(/\t/,$_);
18 :     my $rast_job = $flds[-1];
19 :     my $jobD = "/vol/rast-prod/jobs/$rast_job/rp";
20 :     opendir(D,$jobD) || die $jobD;
21 :     my @tmp = grep { $_ =~ /^\d+\.\d+$/ } readdir(D);
22 :     closedir(D);
23 :     my $genome = $tmp[0];
24 :     print OUT join("\t",(@flds,$genome)),"\n";
25 :     }
26 :     close(OUT);

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3