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

Diff of /FigWebServices/co_occurs_server.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Thu May 7 19:25:35 2009 UTC revision 1.2, Fri May 8 21:24:11 2009 UTC
# Line 35  Line 35 
35      my $str = &YAML::Dump($tuples);      my $str = &YAML::Dump($tuples);
36      print $str;      print $str;
37  }  }
38    elsif ($function eq "pairsets")
39    {
40        my $pairsets = &YAML::Load($cgi->param('args'));
41        my $ans = [];
42        foreach my $pairset (@$pairsets)
43        {
44            push(@$ans,[$pairset,[&FC::co_occurrence_set($db,$pairset)]]);
45        }
46        print &YAML::Dump($ans);
47    }
48    elsif ($function eq "clusters_containing")
49    {
50        my $pegs = &YAML::Load($cgi->param('args'));
51        my $ans = [];
52        foreach my $peg (@$pegs)
53        {
54            my $cluster = &FC::in_co_occurrence_cluster($db,$peg);
55            if ($cluster)
56            {
57                my $func = scalar $fig->function_of($peg);
58                push(@$ans,[$peg,$func,[map { [$_,scalar $fig->function_of($_)] } @$cluster]]);
59            }
60        }
61        print &YAML::Dump($ans);
62    }
63    elsif ($function eq "related_clusters")
64    {
65        my $pegs = &YAML::Load($cgi->param('args'));
66        my $ans = [];
67        foreach my $peg (@$pegs)
68        {
69            my $one_set = [];
70            my @clusters = &FC::largest_co_occurrence_clusters($db,$peg);
71            foreach my $cluster (@clusters)
72            {
73                my($peg1,$sc,$other_pegs) = @$cluster;
74                my $func1 = $fig->function_of($peg1);
75                my $others = [ map { [$_,scalar $fig->function_of($_)] } @$other_pegs];
76                push(@$one_set,[$peg1,$sc,$others]);
77            }
78            push(@$ans,$one_set);
79        }
80        print &YAML::Dump($ans);
81    }
82    elsif ($function eq "related_figfams")
83    {
84        my $ffs = &YAML::Load($cgi->param('args'));
85        my $ans = [];
86        foreach my $ff (@$ffs)
87        {
88            push(@$ans,[$ff,[&FC::co_occurring_FIGfams($db,$ff)]]);
89        }
90        print &YAML::Dump($ans);
91    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3