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

Annotation of /FigKernelScripts/make_sprout_bbhs.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : overbeek 1.1
2 :    
3 :     my $usage = "usage: make_sprout_bbhs GenomesFile > PEG1-PEG2-Genome2-Sc";
4 :    
5 :     (
6 :     ($genomesF = shift @ARGV)
7 :     )
8 :     || die $usage;
9 :    
10 :     %genomes = map { $_ =~ /^(\d+\.\d+)/; $1 => 1 } `cat $genomesF`;
11 :    
12 :     opendir(BBHS,"$FIG_Config::global/BBHs") || die "where are the BBHs?";
13 :     @files = grep { $_ !~ /^\./ } readdir(BBHS);
14 :     closedir(BBHS);
15 :    
16 :     foreach $file (@files)
17 :     {
18 :     open(IN,"<$FIG_Config::global/BBHs/$file") || die "could not open $FIG_Config::global/BBHs/$file";
19 :     while (defined($_ = <IN>))
20 :     {
21 :     if (($_ =~ /^(fig\|(\d+\.\d+)\.peg\.\d+)\t(fig\|(\d+\.\d+)\.peg\.\d+)\t(\S+)/) &&
22 :     $genomes{$2} && $genomes{$4})
23 :     {
24 :     print "$1\t$3\t$4\t$5\n";
25 :     }
26 :     }
27 :     close(IN);
28 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3