[Bio] / FortyEight / rp_quality_check.pl Repository:
ViewVC logotype

View of /FortyEight/rp_quality_check.pl

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.2 - (download) (as text) (annotate)
Fri Nov 24 20:44:08 2006 UTC (13 years, 2 months ago) by olson
Branch: MAIN
Changes since 1.1: +4 -1 lines
updates to 48 code

# -*- perl -*-
# Copyright (c) 2003-2006 University of Chicago and Fellowship
# for Interpretations of Genomes. All Rights Reserved.
# This file is part of the SEED Toolkit.
# The SEED Toolkit is free software. You can redistribute
# it and/or modify it under the terms of the SEED Toolkit
# Public License.
# You should have received a copy of the SEED Toolkit Public License
# along with this program; if not write to the University of Chicago
# at info@ci.uchicago.edu or the Fellowship for Interpretation of
# Genomes at veronika@thefig.info or download a copy from
# http://www.theseed.org/LICENSE.TXT.

use strict;
use GenomeMeta;
use FIG;
use FIG_Config;
use strict;
use File::Basename;

@ARGV == 1 or die "Usage: $0 job-dir\n";

my $jobdir = shift;

-d $jobdir or die "$0: job dir $jobdir does not exist\n";

my $genome = &FIG::file_head("$jobdir/GENOME_ID");
chomp $genome;
$genome =~ /^\d+\.\d+/ or die "$0: Cannnot find genome ID for jobdir $jobdir\n";

my $meta_file = "$jobdir/meta.xml";
my $meta = new GenomeMeta($genome, $meta_file);

my $newD = "$jobdir/rp/$genome";

-d $newD or &fatal("genome directory $newD not found");

$meta->set_metadata("status.qc", "in_progress");

my $cmd = "$FIG_Config::bin/assess_gene_call_quality --meta=$meta_file $newD > $newD/quality.report 2>&1";
$meta->add_log_entry($0, $cmd);
my $rc = system($cmd);

$meta->set_metadata("status.qc", "complete");
$meta->set_metadata("qc.running", "no");

sub fatal
    my($msg) = @_;

    $meta->add_log_entry($0, ['fatal error', $msg]);
    $meta->set_metadata("status.auto_assign", "error");

    croak "$0: $msg";

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3