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

View of /FigKernelScripts/make_sprout_bbhs.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Wed Aug 10 13:27:50 2005 UTC (14 years, 4 months ago) by overbeek
Branch: MAIN
CVS Tags: caBIG-dataload-0, caBIG-00-00-00
Sprout BBH generator.


my $usage = "usage: make_sprout_bbhs GenomesFile > PEG1-PEG2-Genome2-Sc";

(
 ($genomesF = shift @ARGV)
)
    || die $usage;

%genomes = map { $_ =~ /^(\d+\.\d+)/; $1 => 1 } `cat $genomesF`;

opendir(BBHS,"$FIG_Config::global/BBHs") || die "where are the BBHs?";
@files = grep { $_ !~ /^\./ } readdir(BBHS);
closedir(BBHS);

foreach $file (@files)
{
    open(IN,"<$FIG_Config::global/BBHs/$file") || die "could not open $FIG_Config::global/BBHs/$file";
    while (defined($_ = <IN>))
    {
	if (($_ =~ /^(fig\|(\d+\.\d+)\.peg\.\d+)\t(fig\|(\d+\.\d+)\.peg\.\d+)\t(\S+)/) &&
	    $genomes{$2} && $genomes{$4})
	{
	    print "$1\t$3\t$4\t$5\n";
	}
    }
    close(IN);
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3