Skip to content
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

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

Open
ericenns opened this issue Nov 24, 2014 · 5 comments
Open

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

ericenns opened this issue Nov 24, 2014 · 5 comments

Comments

@ericenns
Copy link

$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
@bosborne
Copy link
Member

Eric,

I see you entered this is as a bug, thank you for doing that.

We will take a look ….

Brian O.

On Nov 24, 2014, at 10:16 AM, ericenns [email protected] wrote:

$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

Reply to this email directly or view it on GitHub #6.

@bosborne
Copy link
Member

Eric,

For the moment you can get that detail using display_name().

The problem, I guess, is that the specifications out there in the Web don’t talk about “display name” in field 4, they talk about “name”.

Brian O.

On Nov 24, 2014, at 10:16 AM, ericenns [email protected] wrote:

$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

Reply to this email directly or view it on GitHub #6.

@ericenns
Copy link
Author

Brian,

I tested $feature->display_name() and it gave me the same behaviour as $feature->name(), meaning I also got uninitialized value.

Note I am using Perl v5.20.1 and the lastest version of Bio::FeatureIO

Eric

@bosborne
Copy link
Member

Eric,

display_name() seems to be working in the latest code from github (https://github.com/bioperl/Bio-FeatureIO https://github.com/bioperl/Bio-FeatureIO). What code are you using?

Brian O.

On Nov 24, 2014, at 5:07 PM, ericenns [email protected] wrote:

Brian,

I tested $feature->display_name() and it gave me the same behaviour as $feature->name(), meaning I also got uninitialized value.

Eric


Reply to this email directly or view it on GitHub #6 (comment).

@ericenns
Copy link
Author

Brian,

1.6.905, I installed from cpan.

Eric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants