2 # quick hack to implement a secretom search...
3 # most of this concerns Arabidopsis so we don't have anything in the SGN database...
10 use CXGN
::Tools
::Identifiers qw
| link_identifier
|;
11 my $page = CXGN
::Page
->new();
12 my ($query) = $page->get_encoded_arguments("query");
14 my $secretom_file_dir = '/data/prod/public/secretom/';
16 my $tabfile = 'Tair9RiceBrachyITAG1.tab';
28 <img src='/documents/img/secretom/secretom_logo.jpg' border="0" width="50%" /><br /><br />
31 <input type="text" name="query" value="$query" /><br /><br />
33 <input type="submit" value="Search" size="20" />
46 my @column_headers = (
51 "signalp-nn (Dscore)",
52 "signalp-nn (YES if Dscore >= 0.43, NO otherwise)",
53 "signalp-nn pred sp len",
54 "signalp-hmm sp score",
55 "signalp-hmm sa score",
56 "signalp-hmm prediction (SP,SA or NS)",
57 "targetP result (C,M,S,_)"
61 @matches = `grep -i \"$query\" $secretom_file_dir/$tabfile`; # this should be ok because we use get_encoded_arguments...
63 print "<br /><br />Your search \"<b>$query</b>\" return ".scalar(@matches)." matches. <br /><br />\n";
70 print "Results: <br />\n";
71 print qq | <table alt
="Secretom Results" > |;
73 print format_table_row
(@column_headers);
74 foreach my $match (@matches) {
75 my @fields = (split /\t/, $match)[0,1,4,5,6,7,8,9,10,11,12];
76 my $link = link_identifier
($fields[0]);
77 $fields[0] = $link if(defined $link);
78 print format_table_row
(@fields);
90 sub format_table_row
{
93 return "<tr><td class=\"boxbgcolor5\">".(join "</td><td class=\"boxbgcolor5\">", @row)."</td></tr>\n";