Skip to content

Commit

Permalink
Merge pull request #303 from ens-lgil/feature/gff_94
Browse files Browse the repository at this point in the history
Use MD5 as record ID if there is no 'Name' nor 'ID' in the record
  • Loading branch information
ens-lgil authored Oct 12, 2018
2 parents 2879f2b + 6a8665c commit 71e793e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions modules/Bio/EnsEMBL/VEP/AnnotationSource/File/GFF.pm
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ sub _record_get_id {
my $attributes = $record->{attributes};
$record->{_id} = $attributes->{ID} || $attributes->{Name} || $attributes->{id} || $attributes->{name};
}
# Use MD5 as ID if it's missing in the record
$record->{_id} = $record->{md5} if(!exists($record->{_id}) || $record->{_id} !~ /\w+/);

return $record->{_id};
}
Expand Down
2 changes: 1 addition & 1 deletion modules/Bio/EnsEMBL/VEP/Constants.pm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ use warnings;
use base qw(Exporter);

our $VEP_VERSION = 94;
our $VEP_SUB_VERSION = 2;
our $VEP_SUB_VERSION = 3;

our @EXPORT_OK = qw(
@FLAG_FIELDS
Expand Down

0 comments on commit 71e793e

Please sign in to comment.