Skip to content

Bio::FeatureIO::bed, feature->name doesn't populate correctly #6

@ericenns

Description

@ericenns

$feature->name is not initialised when reading a bed file.

Below is an example describing the issue.

With the following bed file called example.bed

chr1        0       98      Pos1 

And the following perl script called test1.pl

#!/usr/bin/env perl

use strict;
use warnings;

use Bio::FeatureIO;

my $featureIO = Bio::FeatureIO->new(-file=>"example.bed",-format=>'bed');

my $feature = $featureIO->next_feature;

print $feature->name."\n";

On execution I get the following output.

Use of uninitialized value in print at test1.pl line 12

With the following perl script called test2.pl

#!/usr/bin/env perl

use strict;
use warnings;

use Bio::FeatureIO;

my $featureIO = Bio::FeatureIO->new(-file=>"example.bed",-format=>'bed');

my $feature = $featureIO->next_feature;

print $feature->get_tag_values('Name')."\n";

On execution I get the following output.

Pos1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions