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

View of /FigWebServices/tyra_sequence.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (download) (annotate)
Mon Dec 18 23:19:23 2006 UTC (13 years, 3 months ago) by hwang
Branch: MAIN
CVS Tags: mgrast_dev_08112011, rast_rel_2009_05_18, mgrast_dev_08022011, rast_rel_2014_0912, rast_rel_2008_06_18, myrast_rel40, rast_rel_2008_06_16, mgrast_dev_05262011, rast_rel_2008_12_18, mgrast_dev_04082011, rast_rel_2008_07_21, rast_rel_2010_0928, rast_2008_0924, mgrast_version_3_2, mgrast_dev_12152011, rast_rel_2008_04_23, mgrast_dev_06072011, rast_rel_2008_09_30, rast_rel_2009_0925, rast_rel_2010_0526, rast_rel_2014_0729, mgrast_dev_02212011, rast_rel_2010_1206, mgrast_release_3_0, mgrast_dev_03252011, rast_rel_2010_0118, mgrast_rel_2008_0924, mgrast_rel_2008_1110_v2, rast_rel_2009_02_05, rast_rel_2011_0119, mgrast_rel_2008_0625, mgrast_release_3_0_4, mgrast_release_3_0_2, mgrast_release_3_0_3, mgrast_release_3_0_1, mgrast_dev_03312011, mgrast_release_3_1_2, mgrast_release_3_1_1, mgrast_release_3_1_0, mgrast_dev_04132011, rast_rel_2008_10_09, mgrast_dev_04012011, rast_release_2008_09_29, mgrast_rel_2008_0806, mgrast_rel_2008_0923, mgrast_rel_2008_0919, rast_rel_2009_07_09, rast_rel_2010_0827, mgrast_rel_2008_1110, myrast_33, rast_rel_2011_0928, rast_rel_2008_09_29, mgrast_rel_2008_0917, rast_rel_2008_10_29, mgrast_dev_04052011, mgrast_dev_02222011, rast_rel_2009_03_26, mgrast_dev_10262011, rast_rel_2008_11_24, rast_rel_2008_08_07, HEAD
Changes since 1.1: +1 -1 lines
add modified sequences

#/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=CGO>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