[Bio] / FigWebServices / tyra_sequence.cgi Repository:
ViewVC logotype

View of /FigWebServices/tyra_sequence.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (annotate)
Mon Nov 13 17:24:05 2006 UTC (13 years, 6 months ago) by hwang
Branch: MAIN
This cgi gets the tyrA and the other tyrAs in that group

#/usr/bin/perl
use FIG;
use strict;
use CGI;


my $cgi =  new CGI;
print $cgi->header;
my @params = $cgi->param;

print "

Show Group <form method=post action=tyra_sequence.cgi>
<select name=group>
<option value=CG1>TyrCG-1
<option value=CG2>TyrCG-2
<option value=CG3>TyrCG-3
<option value=CG4>TyrCG-4
<option value=CG5>TyrCG-5
<option value=CG6>TyrCG-6
<option value=CG7>TyrCG-7
<option value=CG8>TyrCG-8
<option value=CG9>TyrCG-9
<option value=CG10>TyrCG-10
<option value=CG11>TyrCG-11
<option value=CG12>TyrCG-12
<option value=CG13>TyrCG-13
<option value=CG14>TyrCG-14
<option value=CG15>TyrCG-15
<option value=CG16>TyrCG-16
<option value=CG17>TyrCG-17
<option value=CG18>TyrCG-18
<option value=CG19>TyrCG-19
<option value=CG20>TyrCG-20
<option value=CG21>TyrCG-21
<option value=CG22>TyrCG-22
<option value=CG23>TyrCG-23
<option value=CG24>TyrCG-24
<option value=CG25>TyrCG-25
<option value=CG26>TyrCG-26
<option value=CG27>TyrCG-27
<option value=CG28>TyrCG-28
<option value=CG29>TyrCG-29
<option value=CG30>TyrCG-30
<option value=CG31>TyrCG-31
<option value=CG_Orphans>TyrCG_Orphans
<option value=CG80>TyrCG-80
<option value=CG81>TyrCG-81
<option value=CG82>TyrCG-82
<option value=CG83>TyrCG-83
<option value=CG84>TyrCG-84
<option value=CG85>TyrCG-85
<option value=CG86>TyrCG-86
<option value=CG95>TyrCG-95
<option value=CG98>TyrCG-98
</select> 
<input type=submit value=Go>.
</form>

	";
print $cgi->hr(); 		   
my $seq_string = $cgi->param("seq");
my $group_string = $cgi->param("group");


if ((!$seq_string) && (!$group_string)) {
	print "Check your query";
	exit;
	}	

open (SEQFILE, "Html/group_name_desc_seq.html") or print "Can't find file";
my @seqfile = <SEQFILE>;

print "<pre>";
if(defined ($seq_string)) {
my ($name_in, $group_in) = split(/%/,$seq_string);	
print "$name_in is in $group_in<p>";
print $cgi->hr();
}

if(defined ($group_string)) {
print "Group: $group_string<p>";
print $cgi->hr();
}

foreach (@seqfile) {
   my ($group, $name, $desc, $theseq) = split(/\t/,$_);
   $group =~ s/\s/_/g;
   $theseq=~ s/^\s+//;	
   

   for (my $i=53; $i<length($theseq); $i+=57) {
       substr($theseq, $i, 0) = "<br>"; 
    	}

    if(defined ($seq_string)) {
	#$seq_string=~ s/.*-//;
	#print $seq_string;	   
    	my ($name_in, $group_in) = split(/%/,$seq_string);	
	
	if ($group_in eq $group) {
	
	my $bgcolor = "white";
	my $short_name = $name;
	$short_name=~ s/_.*//g;	
	if ($name_in eq  $short_name) {
	 $bgcolor = "#D2E6F0";	
	}
	print "<div id=$seq_string style=\"background-color:$bgcolor\">";
	print ">$name $desc<br>$theseq";
	print "</div>";
	}
    }
    else {
	if ($group_string eq $group) {
	my $bgcolor = "white";
	my $short_name = $name;
	$short_name=~ s/_.*//g;	
	if ($seq_string eq  $short_name) {
	 $bgcolor = "#D2E6F0";	
	}
	print "<div id=$seq_string style=\"background-color:$bgcolor\">";
	print ">$name $desc<br>$theseq";
	print "</div>";
	}

	}	
	
}
print "</pre>";

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3