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

Annotation of /FortyEight/rp_quality_check.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : olson 1.1 # -*- perl -*-
2 :     #
3 :     # Copyright (c) 2003-2006 University of Chicago and Fellowship
4 :     # for Interpretations of Genomes. All Rights Reserved.
5 :     #
6 :     # This file is part of the SEED Toolkit.
7 :     #
8 :     # The SEED Toolkit is free software. You can redistribute
9 :     # it and/or modify it under the terms of the SEED Toolkit
10 :     # Public License.
11 :     #
12 :     # You should have received a copy of the SEED Toolkit Public License
13 :     # along with this program; if not write to the University of Chicago
14 :     # at info@ci.uchicago.edu or the Fellowship for Interpretation of
15 :     # Genomes at veronika@thefig.info or download a copy from
16 :     # http://www.theseed.org/LICENSE.TXT.
17 :     #
18 :    
19 :     use strict;
20 :     use GenomeMeta;
21 :     use FIG;
22 :     use FIG_Config;
23 :     use strict;
24 :     use File::Basename;
25 :    
26 :     @ARGV == 1 or die "Usage: $0 job-dir\n";
27 :    
28 :     my $jobdir = shift;
29 :    
30 :     -d $jobdir or die "$0: job dir $jobdir does not exist\n";
31 :    
32 :     my $genome = &FIG::file_head("$jobdir/GENOME_ID");
33 :     chomp $genome;
34 :     $genome =~ /^\d+\.\d+/ or die "$0: Cannnot find genome ID for jobdir $jobdir\n";
35 :    
36 :     my $meta_file = "$jobdir/meta.xml";
37 :     my $meta = new GenomeMeta($genome, $meta_file);
38 :    
39 :     my $newD = "$jobdir/rp/$genome";
40 :    
41 :     -d $newD or &fatal("genome directory $newD not found");
42 :    
43 :     $meta->set_metadata("status.qc", "in_progress");
44 :    
45 : olson 1.2 my $cmd = "$FIG_Config::bin/assess_gene_call_quality --meta=$meta_file $newD > $newD/quality.report 2>&1";
46 :     $meta->add_log_entry($0, $cmd);
47 :     my $rc = system($cmd);
48 : olson 1.1
49 :     $meta->set_metadata("status.qc", "complete");
50 : olson 1.2 $meta->set_metadata("qc.running", "no");
51 : olson 1.1
52 :     sub fatal
53 :     {
54 :     my($msg) = @_;
55 :    
56 :     $meta->add_log_entry($0, ['fatal error', $msg]);
57 :     $meta->set_metadata("status.auto_assign", "error");
58 :    
59 :     croak "$0: $msg";
60 :     }
61 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3