Permalink
Browse files

have perl code to produce interaction type blub similar to what d2c p…

…roduces
  • Loading branch information...
sibyl229 committed Dec 7, 2017
1 parent 8977601 commit f9b80d871c3bf514bce55031bc0e6981bb8cffbc
Showing with 12 additions and 8 deletions.
  1. +12 −8 lib/WormBase/API/Role/Interaction.pm
@@ -328,16 +328,20 @@ sub _get_interaction_info {
sub _get_interaction_type_name {
my ($self, $interaction) = @_;
my $type = $interaction->Interaction_type;
$type = $type->right ? $type->right . '' : "$type";
$type =~ s/_/ /g;
if ($type eq 'Regulatory') {
if ( my $reg_result = $interaction->Regulation_result ) {
if ("$reg_result" =~ /^(.*tive)_regulate$/) { $type = $1 . "ly Regulates" }
elsif ("$reg_result" eq 'Does_not_regulate') { $type = "Does Not Regulate" }
my @types = $interaction->Interaction_type;
foreach my $type (@types) {
next if ("$type" eq "Genetic" && "" . $type->right ne "Genetic_interaction");
$type = $type->right ? "$type:" . $type->right : "$type";
if ($type eq 'Regulatory') {
if ( my $reg_result = $interaction->Regulation_result ) {
if ("$reg_result" =~ /^(.*tive)_regulate$/) { $type = $1 . "ly Regulates" }
elsif ("$reg_result" eq 'Does_not_regulate') { $type = "Does Not Regulate" }
}
}
$type =~ s/_/-/g;
$type = lc $type;
return $type;
}
return $type;
}
##

0 comments on commit f9b80d8

Please sign in to comment.