Skip to content

[115] Update Regulatory features links on Z-menu #1070

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions modules/EnsEMBL/Web/ZMenu/Regulation.pm
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,25 @@ sub content {
$self->caption($caption);

my $object = $self->new_object('Regulation', $reg_feature, $self->object->__data);

my $species = $hub->species;
my $species_defs = $hub->species_defs;
my $species_prod_name = $species_defs->get_config($species, 'SPECIES_PRODUCTION_NAME');
my $ensembl_version = $species_defs->ENSEMBL_VERSION;
my $feature_url = sprintf("https://regulation.ensembl.org/%s/regulatory_features/%s/%s", $ensembl_version, $species_prod_name, $object->stable_id);

$self->add_entry({
type => 'ID',
label => $object->stable_id,
link => $object->get_summary_page_url
label_html => sprintf("<a href=\"%s\" rel=\"external\" >%s</a>", $feature_url, $object->stable_id),
});

if (!($reg_feature->feature_type->name =~ /^EMAR/) && !($reg_feature->feature_type->name =~ /^CTCF/)) {
$self->add_entry({
type => 'Activity',
label => 'Regulatory activity',
link => $object->get_summary_page_url
label_html => sprintf("<a href=\"%s\" rel=\"external\" >Regulatory activity</a>", $feature_url),
});
}

$self->add_entry({
type => 'Type',
label => $object->feature_type->name
Expand Down