1 use Bio
::Chado
::Schema
;
5 use CXGN
::Scrap
::AjaxPage
;
7 use CatalystX
::GlobalContext
'$c';
9 my $doc = CXGN
::Scrap
::AjaxPage
->new();
10 $doc->send_http_header();
12 my ($species) = $doc->get_encoded_arguments("species");
14 my $json = JSON
->new();
16 my $schema = $c->dbic_schema('Bio::Chado::Schema', 'sgn_chado');
18 my $org_rs = $schema->resultset("Organism::Organism")->search({species
=>{'ilike'=>'%'.$species.'%'}});
22 while (my $org = $org_rs->next){
23 $species{$org->organism_id()}=$org->species();
26 my $jobj = $json->encode(\
%species);