File: docnucleusindex.pl

package info (click to toggle)
emboss 6.6.0%2Bdfsg-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 571,584 kB
  • sloc: ansic: 460,579; java: 29,383; perl: 13,573; sh: 12,753; makefile: 3,294; csh: 706; asm: 351; xml: 239; pascal: 237; modula3: 8
file content (133 lines) | stat: -rwxr-xr-x 3,441 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#!/usr/bin/perl -w

print "<div id=\"table\">
<table cellpadding =\"5\">
<tr><th>LIBRARY</th>  <th>DATATYPES</th>  <th>FUNCTIONS</th> <th>NOTES</th> </tr>
";

%ignorefiles = (
    "index" => "indexfile",
    );


%knownfiles = (
    "embaln" => "Alignments",
    "embcom" => "Complexity algorithms",
    "embcons" => "Consensus sequences",
    "embdata" => "Data file utilities",
    "embdbi" => "Database indexing using EMBL-CD indices",
    "embdmx" => "Domainatrix package algorithms",
    "embdomain" => "Domain algorithms",
    "embest" => "EST algorithms",
    "embexit" => "Exit calls for applications",
    "embgroup" => "Groups of applications",
    "embiep" => "Isoelectric point utilities",
    "embindex" => "Indexing databases using B+ trees",
    "embinit" => "Initialising internals",
    "embmat" => "Comparison matrices",
    "embmisc" => "Miscellaneos methods",
    "embmol" => "Molecular fragment algorithms",
    "embnmer" => "N-mer (word) algorithms",
    "embpat" => "Pattern matching algorithms",
    "embpatlist" => "Pattern list file reading",
    "embpdb" => "Protein databank (PDB) structure file utilities",
    "embprop" => "Properties of protein sequences",
    "embread" => "Reading data files",
    "embshow" => "Showing sequences in pretty formats",
    "embsig" => "Signatures of protein domains",
    "embword" => "Word matching algorithms",
    "embxyz" => "XYZ 3D coordinate algorithms",
);

opendir(DIR, ".");
while ($file = readdir(DIR)) {
    if($file =~ /^[.]/) {next}
    if(-d $file) {next}
    if($file =~ /[~]$/) {next}
    if($file =~ /[.]inc$/) {next}
    if($file =~ /^(.*)_static[.]html$/) {next}
    elsif($file =~ /^(.*)[.]html$/) {
	$fpref=$1;
	if($ignorefiles{$fpref}) {next}
    }
    else {
	print "+++ unknown file type $file\n";
	next;
    }
    $empty=0;
    open (HTML, "$file");
    while (<HTML>) {
	if (/No public datatype definitions in source file/) {$empty=1}
    }
#    print "$file ($fpref)\n";
    close (HTML);

    open (DD, "../datadef/$file");
    $emptyd = 0;
    while (<DD>) {
	if(/No public datatype definitions in source file/) {$emptyd=1}
    }
    close (DD);

    if(!defined($knownfiles{$fpref})) {
	    print STDERR "Unknown file: $fpref\n";
    }
    else {
	$out = "\n<tr><td><b><i>$knownfiles{$fpref}</b></i></td>\n";
	if(!$emptyd) {
	    $out .= "<td><a href=\"../datadef/$fpref.html\">Datatypes</a></td>\n";
	}
	else {
	    $out .= "<td>&nbsp;</td>\n";
	}
	if(!$empty) {
	    $out .= "<td><a href=\"$fpref.html\">Functions</a></td>\n";
	}
	else {
	    $out .= "<td>&nbsp;</td>\n";
	}
	$label = uc($fpref);
	$label =~ s/^AJ//;

	$out .= "<td><a href=\"#$label\">Notes</a></td></tr>\n";
	$out{$fpref} = $out;
    }
}
closedir(DIR);


foreach $x(keys(%knownfiles)) {
    if(defined($out{$x})) {
	print $out{$x};
    }
    else {
	$fpref = $x;
	open (DD, "../datadef/$fpref.html");
	$emptyd = 0;
	while (<DD>) {
	    if(/No public datatype definitions in source file/) {$emptyd=1}
	}
	close (DD);

	$out = print "<tr><td><b><i>$knownfiles{$fpref}</b></i></td>\n";
	if(!$emptyd) {
	    $out .= "<td><a href=\"../datadef/$fpref.html\">Datatypes</a></td>\n";
	}
	else {
	    $out .= "<td>&nbsp;</td>\n";
	}

# we know there are no documented public functions!

	$out .= "<td>&nbsp;</td>\n";

	$label = uc($fpref);
	$label =~ s/^AJ//;

	$out .= "<td><a href=\"#$label\">Notes</a></td></tr>\n";
	$out{$fpref} = $out;
	print $out{$x};
    }
}
print "</table>\n";