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

View of /FigKernelScripts/make_kb_md5.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Tue Feb 3 21:16:01 2015 UTC (4 years, 9 months ago) by disz
Branch: MAIN
CVS Tags: HEAD
New script to create kbstyle md5's

use strict;
use MD5Computer;
use FIG;

my $orgD = "$FIG_Config::organisms";

my ($mode, @genomes) = FIG::parse_genome_args(@ARGV);

if ($mode eq "all") {
    opendir(ORGS, "$orgD") || die "Could not open dir $orgD";
    @genomes = (grep { $_ !~ /^\./ } readdir(ORGS));
} 

foreach my $org (@genomes) {
    if (! -s "$orgD/$org/KB_MD5") {
        if (-s "$orgD/$org/contigs") {
            my $md5 = MD5Computer->new_from_fasta("$orgD/$org/contigs")->genomeMD5;
            open(MD5, ">$orgD/$org/KB_MD5") || die "could not open $orgD/$org/KB_MD5";
            print MD5 "$md5\n";
            close(MD5);
        } else {
            print STDERR "Could not open $orgD/$org/contigs \n";
        }
    }
}
                                       

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3