ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/yamap/summarizer.pl
Revision: 1.1
Committed: Wed Dec 13 10:50:01 2006 UTC (9 years, 5 months ago) by gawi79
Branch: MAIN
CVS Tags: HEAD
Log Message:
A QuickMine script

Line File contents
1 #!/usr/bin/perl -w
2
3 ##############################################
4 ##############################################
5 # SCRIPT NAME: summarizer
6 # FUNCTION: get files and make links in a very simple webpage
7 # AUTHOR: Cared for by Gareth Wilson (gawi@ceh.ac.uk)
8 ##############################################
9
10
11 # Version v 0.1
12
13
14 use strict;
15 use Config::Simple;
16
17
18 unless (@ARGV ==1) {
19 die "\n\nUsage:\n ./quickmine.pl file.cfg\nPlease try again.\n\n\n";}
20
21
22 # pick up the name of the config file
23 my $config_file = shift;
24
25 # create a new object containing the variables in the cfg file
26 my $cfg = new Config::Simple($config_file);
27
28
29 # initialize the variables shared with the config file
30 my $path2proteins = $cfg->param('PATHS.path2proteins');
31 my $path2output = $cfg->param('PATHS.path2output');
32 my $stylesheet = $cfg->param('PARAMS.stylesheet');
33
34
35 # files ending in....
36 my @file_types = (
37 "gene_table.html",
38 "QM.html",
39 "overview.html",
40 "prot",
41 "matrix.html",
42 "scores.html",
43 "rank.html",
44 "hits.html",
45 "tophit.html",
46 "list.html",
47 "count.html",
48 "orphans.html",
49 "size.html",
50 "para.html",
51 "increment.html",
52 "time.html",
53 "binary.html",
54 "plot.html",
55 "synteny.html"
56 );
57
58
59 chdir $path2output;
60
61 my ($file, $date, $new_file) = "";
62
63 open(DATE, "date|");
64 $date = <DATE>;
65 close(DATE);
66
67
68
69 print <<HTML;
70 <html>
71 <head>
72 <title>Untitled Document</title>
73 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
74 <link rel="stylesheet" href="$stylesheet" type="text/css">
75
76 </head>
77
78 <body bgcolor="#FFFFFF" text="#000000">
79
80 Files summarized from: $path2output on $date<P>
81 HTML
82
83
84 foreach $file (@file_types) {
85 my @new_files = <*$file>;
86 foreach $new_file (@new_files) {
87 print "<a href=\"$new_file\">$new_file</a><br>";
88 }
89 }
90
91
92 print <<HTML;
93 </body>
94 </html>
95 HTML