ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/yamap/run_art.pl
Revision: 1.1.1.1 (vendor branch)
Committed: Thu Sep 7 15:35:21 2006 UTC (9 years, 8 months ago) by knirirr
Branch: MAIN, cehox
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
Log Message:
Imported sources

Line File contents
1 #!/usr/bin/perl
2
3 use strict;
4 use Config::Simple;
5 use File::Basename;
6
7 # get infiles and glob tabs
8 unless (@ARGV)
9 {
10 die "Usage run_art.pl <basedir>\n";
11 }
12
13 # basedir
14 my $basedir = shift;
15
16 # get artemis location from configs
17 my $installdir = "/usr/local/bioinf/yamap/yamap";
18 my $path_file = "$installdir/etc/yamap_paths.ini";
19 my $paths = new Config::Simple($path_file);
20 my $proc = $paths->param(-block=>'PROCESSING');
21 my $artemis = $proc->{artemis};
22
23
24 # get the list out output files
25 my $out = $basedir . "/yamap_out/";
26 opendir(DIR, $out) || warn "Can't opendir $out: $!";
27 my @files = grep { /\.embl$/ } readdir(DIR);
28 closedir DIR;
29 unless (@files)
30 {
31 print "No annotations found for this genome.\n";
32 exit;
33 }
34 foreach my $file (@files)
35 {
36 print "Running command: $artemis $file\n";
37 unless (system("$artemis $out/$file") ==0)
38 {
39 die "Can't run artemis: $!";
40 }
41 }
42
43 # finished
44 print "All files viewed.\n";