Skip to content
Browse files

Fix pan compara link actions

  • Loading branch information...
1 parent 8272d38 commit d041b4243016e69458f3cdc2609779f60fac7261 @nicklangridge nicklangridge committed Feb 24, 2014
Showing with 9 additions and 5 deletions.
  1. +9 −5 modules/EnsEMBL/Web/Component/Gene/ComparaTree.pm
View
14 modules/EnsEMBL/Web/Component/Gene/ComparaTree.pm 100644 → 100755
@@ -31,6 +31,10 @@ sub content {
my $is_genetree = $object->isa('EnsEMBL::Web::Object::GeneTree') ? 1 : 0;
my ($gene, $member, $tree, $node);
+## EG
+ my $url_function = $cdb eq 'compara' ? '' : 'pan_compara';
+##
+
if ($is_genetree) {
$tree = $object->Obj;
$member = undef;
@@ -49,7 +53,7 @@ sub content {
my $highlight_gene = $hub->param('g1');
my $highlight_ancestor = $hub->param('anc');
# EG add ht param
- my $unhighlight = $highlight_gene ? $hub->url({function => 'Compara_Tree', g1 => undef, collapse => $collapsed_nodes, ht => $hub->param('ht') }) : '';
+ my $unhighlight = $highlight_gene ? $hub->url({action => 'Compara_Tree', function => $url_function, g1 => undef, collapse => $collapsed_nodes, ht => $hub->param('ht') }) : '';
my $image_width = $self->image_width || 800;
my $colouring = $hub->param('colouring') || 'background';
my $collapsability = $is_genetree ? '' : $hub->param('collapsability') || '';
@@ -223,12 +227,12 @@ sub content {
# EG include the ht param
if ($gene) {
- push @view_links, sprintf $li_tmpl, $hub->url({ function => 'Compara_Tree', ht => $hub->param('ht'), collapse => $collapsed_to_gene, g1 => $highlight_gene }), $highlight_gene ? 'View current genes only' : 'View current gene only';
- push @view_links, sprintf $li_tmpl, $hub->url({ function => 'Compara_Tree', ht => $hub->param('ht'), collapse => $collapsed_to_para || undef, g1 => $highlight_gene }), $highlight_gene ? 'View paralogs of current genes' : 'View paralogs of current gene';
+ push @view_links, sprintf $li_tmpl, $hub->url({ action => 'Compara_Tree', function => $url_function, ht => $hub->param('ht'), collapse => $collapsed_to_gene, g1 => $highlight_gene }), $highlight_gene ? 'View current genes only' : 'View current gene only';
+ push @view_links, sprintf $li_tmpl, $hub->url({ action => 'Compara_Tree', function => $url_function, ht => $hub->param('ht'), collapse => $collapsed_to_para || undef, g1 => $highlight_gene }), $highlight_gene ? 'View paralogs of current genes' : 'View paralogs of current gene';
}
- push @view_links, sprintf $li_tmpl, $hub->url({ function => 'Compara_Tree', ht => $hub->param('ht'), collapse => $collapsed_to_dups, g1 => $highlight_gene }), 'View all duplication nodes';
- push @view_links, sprintf $li_tmpl, $hub->url({ function => 'Compara_Tree', ht => $hub->param('ht'), collapse => 'none', g1 => $highlight_gene }), 'View fully expanded tree';
+ push @view_links, sprintf $li_tmpl, $hub->url({ action => 'Compara_Tree', function => $url_function, ht => $hub->param('ht'), collapse => $collapsed_to_dups, g1 => $highlight_gene }), 'View all duplication nodes';
+ push @view_links, sprintf $li_tmpl, $hub->url({ action => 'Compara_Tree', function => $url_function, ht => $hub->param('ht'), collapse => 'none', g1 => $highlight_gene }), 'View fully expanded tree';
push @view_links, sprintf $li_tmpl, $unhighlight, 'Switch off highlighting' if $highlight_gene;
# /EG

0 comments on commit d041b42

Please sign in to comment.
Something went wrong with that request. Please try again.