fix run_model call so that it works with non-default options as well.
[sgn.git] / mason / tools / genefamily / search.mas
blob756be8743ac0c6ff5794c7877f8132eb5ee0b9ae
2 <%doc>
4 </%doc>
6 <%args>
7 $build => "dummy_build_test"
8 $genefamily_id => undef
9 $member_id => undef
10 $action => undef
11 </%args>
13 <& /page/page_title.mas, title=>'Gene family search' &>
16 <h4>Browse Genefamilies</h4>
18 <%perl>
20 use SGN::Genefamily;
21 use Bio::Seq;
23 my  $DIR = $c->get_conf('genefamily_dir'); # '/home/mueller/dutch_tomato_assembly/tomato_ara_rice_comparison/';
24 if (!$action) { $action = "input"; }
25 if ($genefamily_id eq '') { $genefamily_id=0; }
28 my @builds = SGN::Genefamily->get_available_builds($DIR);
30 my $select = '<select id="build" name="build">';
31 my $selected = "";
32 foreach my $d (@builds) {
33   if ($d eq $build) { $selected="selected=\"selected\" "; }
34   else { $selected= ""; }
35   $select .= qq | <option value="$d" $selected>$d</option> |;
37 $select .= "</select>";
39 print $select."<br /><br />";
41 </%perl>
44 <table id="genefamily_datatable">
45 <thead>
46   <th>Genefamily ID</th><th>Sequences</th><th>Alignments</th><th>Trees</th><th>Member Count</th><th>Members</th></thead>
47   </thead>
48   <tbody>
49   </tbody>
50   </table>
53 <script>
55 jQuery(document).ready( function() {
57     var build = jQuery('#build option:selected').val();
58     //alert('using build '+build);            
59     jQuery('#genefamily_datatable').dataTable( {
60         ajax: '/ajax/tools/genefamily/table?build='+build,
61         destroy: true,
62         "aoColumnDefs": [
63             { "bSearchable" : true,
64               "bVisible"   : false,
65               "aTargets"   : [ 5 ]
66             }]
67     });
68 });
70 </script>
79 <%init>
80 use File::Spec::Functions;
81 </%init>