[Bio] / DrugTargets / DrugTargetsWeb.pl Repository:
ViewVC logotype

View of /DrugTargets/DrugTargetsWeb.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (download) (as text) (annotate)
Thu Jun 30 21:37:04 2005 UTC (14 years, 5 months ago) by olson
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +13 -3 lines
Fix to use the installed data location, print out error to webpage if not found.

use FIG_Config;

use CGI qw(:standard);

print "Content-type: text/html; charset=UTF-8\n\n";

$dataDir = "$FIG_Config::fig/var/DrugTargets";
$dataFile = "$dataDir/drugTargets.txt";

if (!open DRUG_TARGETS, $dataFile)
{
    warn "can't open file $dataFile: $!";
    print "<h1>Cannot open data file</h1>\n";
    print "Cannot open data file $dataFile: $!\n";
    exit 0;
}

print "<TABLE ID=table0 BORDER=1>";
print "<TBODY>";
print "<tr><th>Attributes</th><th>Gene ID</th><th>Fig Id</th><th>PDB</th><th>score</th><th>bit</th></tr>\n";

my @drugTargetList = <DRUG_TARGETS>;

for my $a(@drugTargetList) {
   
    	$a =~ /(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*)/;
	$searchTerm = $1;	
	$figId = $2;	
	$class = $3;
	$pdbName = $4;
	$tag = $5;
	$eNo = $6;

	print "<tr><td>$class</td><td>$searchTerm</td><td>$figId</td><td>$pdbName</td><td>$tag</td><td>$eNo</td></tr>\n";    
}

print "</TABLE>";
print "</BODY>";
print "</HTML>";


1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3