#!/usr/bin/perl
#print this MIME data no matter what
print "Content-type: text/html\n\n";
#flush stdout buffer
$| = 1;
&parse_form_data (*data);
#Calculations
use Table;
$loc_data_table = "features";
$scid = $data{'scid'};
$scid =~ s/^\s*(.*?)\s*$/$1/; #get rid of bordering white space
$scid = uc($scid);
$scid =~ s/-//g; #remove any hyphens from scid
$opt = $data{'opt'};
#first see if the id format is correct
foreach (T_LoadRows ($loc_data_table)) {
if ($_->{"scid_"} eq $scid) {
($cdc28) = T_GetFields($_,"cdc28");
($masageg,$masagel,$masages,$mayoung,$ch_a,$ch_alpha,$ch_gal,$ch_heat,$samson,$mrcyc15,$mrcyc28,$mrcycsd,$mrcyelu,$mrdiasd,$cdc28,$ckii,$coildco,$farn,$ggsi,$glyc,$hdel,$knocout,$length,$mit1,$mit2,$myri,$nuc1,$nuc2,$pi,$pka,$plmnew1,$pox1,$rostall,$sig1,$signalp,$tms1,$ref_mrna_expr,$ref_prot_expr) = T_GetFields($_,"sage-gm_phase","sage-l_phase","sage-s_phase","young","church-a","church-alpha","church-gal","church-heat","samson","std-cdc15","std-cdc28","std-alpha","std-elu","std-diauxic","cdc28","ckii","coildco","farn","ggsi","glyc","hdel","knockout","length","mit1","mit2","myri","nuc1","nuc2","pi","pka","plmnew1","pox1","rostall","sig1","signalp","tms1","ref_mrna_expr","ref_prot_expr");
last;
}
}
if (not defined $cdc28){ #ORF not found
print "
The ORF you specified does not exist.";
exit(1);
}
if ($knocout == 1) {$knocout = "lethal";} else {$knocout = "viable";}
###############################################################################
#CGI Output
#Create html document
print <
ORF Features
HTML
my $hvar = `perl /web/genecensus/header/header.cgi features`; print $hvar;
print <Features for $scid
Absolute Expression Data |
Feature | Value
| Reference mRNA Expression (copies/cell) | $ref_mrna_expr
| Reference Protein Expression (10^3 copies/cell) | $ref_prot_expr
| Young mRNA Expression [Help] | $mayoung
| SAGE mRNA Expression (g/m phase) [Help] | $masageg
| SAGE mRNA Expression (l phase) [Help] | $masagel
| SAGE mRNA Expression (s phase) [Help] | $masages
| Church mRNA Expression (a) [Help] | $ch_a
| Church mRNA Expression (alpha) [Help] | $ch_alpha
| Church mRNA Expression (gal) [Help] | $ch_gal
| Church mRNA Expression (heat) [Help] | $ch_heat
| Samson mRNA Expression [Help] | $samson |
Relative Expression Data |
Feature | Value
| Cell Cycle mRNA Expr. Fluctuation (CDC15 arrest) [Help] | $mrcyc15
| Cell Cycle mRNA Expr. Fluctuation (CDC28 arrest) [Help] | $mrcyc28
| Cell Cycle mRNA Expr. Fluctuation (Alpha-factor arrest) [Help] | $mrcycsd
| Cell Cycle mRNA Expr. Fluctuation (Elutriation) [Help] | $mrcyelu
| Diauxic Shift mRNA Expr. Fluctuation [Help] | $mrdiasd
|
Sequence Motifs |
Feature | Value
| Nuclear Localization Signal 1 [Help] | $nuc1
| Nuclear Localization Signal 2 [Help] | $nuc2
| Mitochondrial Signal 1 [Help] | $mit1
| Mitochondrial Signal 2 [Help] | $mit2
| HDEL ER Retention Signal [Help] | $hdel
| Plasma Membrane Signal [Help] | $plmnew1
| Peroxisome Import Signal [Help] | $pox1
| Signal Sequence (method 1) [Help] | $sig1
| Signal Sequence (method 2) [Help] | $signalp
| Glycosylation sites [Help] | $glyc
| Farnesylation site [Help] | $farn
| Geranylgeranylation site [Help] | $ggsi
| Myristolation site [Help] | $myri
HTML
if ($opt =~ /1/) {
print < | Potential CDC 28 kinase sites [Help] | $cdc28
| Potential Casein kinase II sites [Help] | $ckii
HTML
}
print < | Potential protein kinase A target sites [Help] | $pka
| Coiled Coils [Help] | $coildco
|
| |
Other Properties |
Feature | Value
| Knockout Mutation [Help] | $knocout
| Isoelectric Point [Help] | $pi
| Trans-membrane Segments [Help] | $tms1
| Length (amino acids) [Help] | $length
| Surface Amino Acid Composition Compartment [Help] | $rostall
|
|
HTML
exit;
sub parse_form_data
{
local (*FORM_DATA) = @_;
local ($request_method, $query_string, @key_value_pairs, $key_value, $key, $value);
$request_method = $ENV{'REQUEST_METHOD'};
if ($request_method eq "GET") {
$query_string = $ENV{'QUERY_STRING'};
} elsif ($request_method eq "POST") {
read(STDIN, $query_string, $ENV{'CONTENT_LENGTH'}); #no. of bytes to receive
} else {
&return_error (500, "Server Error", "Server uses unsupported method");
}
@pairs = split(/&/, $query_string); #making list of keyword-value pair
foreach $pair (@pairs)
{
($key, $value) = split(/=/, $pair);
$value =~ tr/+/ /; #translate "+" to space
#decipher ASCI hexadecimal escaped characters
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
if (defined ($FORM_DATA{$key})) {
$FORM_DATA{$key} = join ("\0", $FORM_DATA{$key}, $value);
} else {
$FORM_DATA{$key} = $value;
}
}
}
sub return_error
{
local ($status, $keyword, $message) = @_;
print "Content-type: text/html", "\n";
print "Status: ", $status, " ", $keyword, "\n\n";
print <
CGI Program - Unexpected Error
$keyword
$message
Please contact the webmaster for more information.
End_of_Error
exit(1);
}