Skip to content

Commit

Permalink
Bug fix: handling multiple tag values
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamara El Naboulsi committed Feb 14, 2024
1 parent 8d7f805 commit a6b7088
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion modules/Bio/EnsEMBL/IO/Parser/GTF.pm
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,15 @@ sub get_attributes {
$value =~ s/"//g if $value;
$key =~ s/^\s+//;
$key =~ s/\s+$//;
$attributes{$key} = $value ? $self->decode_string($value) : $value;
$value = $self->decode_string($value) if $value;

if (defined($attributes{$key})) {
my @values = (ref($attributes{$key}) eq 'ARRAY' ? @{$attributes{$key}} : ($attributes{$key}));
push(@values, $value);
$attributes{$key} = \@values;
} else {
$attributes{$key} = $value;
}
}
return \%attributes;
}
Expand Down

0 comments on commit a6b7088

Please sign in to comment.