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

Annotation of /FigWebServices/co_occurs_server.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download)

1 : overbeek 1.1 use strict;
2 :     use Data::Dumper;
3 :    
4 :     use YAML;
5 :    
6 :     use CGI;
7 :     my $cgi = new CGI;
8 :    
9 :     use FIG;
10 :     my $fig = new FIG;
11 :    
12 :     use ERDB;
13 :     use FC;
14 :    
15 :     my $function = $cgi->param('function');
16 :     $function || die "Missing a function in call to co_occurs_server.cgi";
17 :    
18 :     my $db = ERDB::GetDatabase('Sapling');
19 :    
20 :     if ($function eq "conserved_in_neighborhood")
21 :     {
22 :     my $pegs = &YAML::Load($cgi->param('args'));
23 :     my $tuples = [];
24 :     foreach my $peg (@$pegs)
25 :     {
26 :     my $group = [];
27 :     my @co_occurs = &FC::co_occurs($db,$peg);
28 :     foreach my $tuple (@co_occurs)
29 :     {
30 :     my($sc,$fid,$pairset) = @$tuple;
31 :     push(@$group,[$sc,$fid,scalar $fig->function_of($fid),$pairset]);
32 :     }
33 :     push(@$tuples,$group);
34 :     }
35 :     my $str = &YAML::Dump($tuples);
36 :     print $str;
37 :     }
38 :    
39 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3