Git Product home page Git Product logo

bio-featureio's People

Contributors

bosborne avatar carandraug avatar cjfields avatar cmungall avatar fangly avatar fjossandon avatar heikkil avatar hlapp avatar hyphaltip avatar rbuels avatar scottcain avatar sendu avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bio-featureio's Issues

BED file strand '.' is produces strand -1 instead of 0?

The BED file spec says that strand given as '.' is unstranded but when parsed I am seeing that it is -1

test.pl

use Bio::FeatureIO;
use Data::Dumper;

my $io = Bio::FeatureIO->new(
    -format => 'bed',
    -file => 'test.txt'
);

while ( my $f = $io->next_feature() ) {
    print $f->strand;
}

test.txt

NbV1Ch01	18776453	18777002	MACS2_peak_1486	34	.	2.35549	5.48617	3.42439	437

Some missing dependencies, maybe?

After downloading a zipfile of Bio-FeatureIO from GitHub, I needed to install the following modules to get it to pass it's tests and install via:

cd /tmp/Bio-FeatureIO-master
cpanm .
Test::Warn
Exception::Class
Tree::DAG_Node
Test::Deep

I already had the current BioPerl from CPAN and various chado related bits (Bundle::Chado, Go-Perl) installed.

Some (all?) seem to be test phase dependencies. Maybe the dist.ini should use the Autoprereqs plugin?

gff.pm has problemas when parsing Target attribute

gff.pm in 1.6 decodes strings in the wrong place, resulting in exception even if valid values.

GFF3 specification:

Target

Indicates the target of a nucleotide-to-nucleotide or protein-to-nucleotide alignment. The format of the value is "target_id start end [strand]", where strand is optional and may be "+" or "-". If the target_id contains spaces, they must be escaped as hex escape %20.

However, line 636 from gff.pm assigns a DECODED value to attr Target, converting valid %20 into spaces
So, Target='A%20B 1 23 +;' will be converted to $attr{'Target'} = 'A B 1 23 +' when it should keep the original value.
This brings problems when the value is parsed at line 706 (my ($t_id,$tstart,$tend,$strand,$extra) = split /\s+/, $target_string; ), resulting in an exception 'The value in the Target string, $target_string, does not conform to the GFF3 specification'

creating a Bio::SeqFeature::Annotation object downloads the entire so.obo


Author Name: Heikki Lehvaslaiho (@heikkil)
Original Redmine Issue: 2513, https://redmine.open-bio.org/issues/2513
Original Date: 2008-06-10
Original Assignee: Bioperl Guts


A Bio::SeqFeature::Annotated object can not be created unless there is
a network connection. It tries to downloads a song SO.obo file from sourceforce. See the stack trace below.

Does this class really need to connect to network by default?

As a first fix, I’ve disabled running of tests in t/SeqFeatAnnotated.t
unless networked tests have been enabled.

-Heikki

P.S. I committed the temporary fix to tests in a wrong directory, so all the most recent POD fixes in bioperl-live got the comment meant for this fix.

——————————- WARNING ——————————-
MSG: [1/5] tried to fetch http://song.cvs.sourceforge.net/\*checkout\*/song/ontology/so.obo?rev=HEAD, but server threw 500. retrying…
—————————————————————————-
signalled

——————- EXCEPTION: Bio::Root::Exception ——————-
MSG: failed to fetch http://song.cvs.sourceforge.net/\*checkout\*/song/ontology/so.obo?rev=HEAD, server threw 500
STACK: Error::throw
STACK: Bio::Root::Root::throw /home/heikki/src/bioperl-live/Bio/Root/Root.pm:357
STACK: Bio::Root::IO::_initialize_io /home/heikki/src/bioperl-live/Bio/Root/IO.pm:272
STACK: Bio::OntologyIO::_initialize /home/heikki/src/bioperl-live/Bio/OntologyIO.pm:187
STACK: Bio::OntologyIO::obo::_initialize /home/heikki/src/bioperl-live/Bio/OntologyIO/obo.pm:137
STACK: Bio::OntologyIO::new /home/heikki/src/bioperl-live/Bio/OntologyIO.pm:162
STACK: Bio::OntologyIO::new /home/heikki/src/bioperl-live/Bio/OntologyIO.pm:171
STACK: Bio::Ontology::OntologyStore::get_ontology /home/heikki/src/bioperl-live/Bio/Ontology/OntologyStore.pm:225
STACK: Bio::SeqFeature::Annotated::primary_tag /home/heikki/src/bioperl-live/Bio/SeqFeature/Annotated.pm:656
STACK: Bio::SeqFeature::Annotated::_initialize /home/heikki/src/bioperl-live/Bio/SeqFeature/Annotated.pm:244
STACK: Bio::SeqFeature::Annotated::new /home/heikki/src/bioperl-live/Bio/SeqFeature/Annotated.pm:210
STACK: t/SeqFeatAnnotated.t:16

Bio::FeatureIO gff3 fails to parse canonical GFF3 file from GFF3 spec


Author Name: Keith James (Keith James)
Original Redmine Issue: 2429, https://redmine.open-bio.org/issues/2429
Original Date: 2008-01-03
Original Assignee: Bioperl Guts


I was getting this error from all my GFF3 files:

——————- EXCEPTION: Bio::Root::Exception ——————-
MSG: Oops! ID cds00001 exists more than once in your file!
STACK: Error::throw
STACK: Bio::Root::Root::throw /software/perl-5.8.8/lib/site_perl/5.8.8/Bio/Root/Root.pm:359
STACK: Bio::FeatureIO::gff::next_feature_group /software/perl-5.8.8/lib/site_perl/5.8.8/Bio/FeatureIO/gff.pm:206

Several code comments within Bio/FeatureIO/gff.pm indicate that it assumes an unique ID for each line. The spec states that an ID must be unique within a file, but one assumes that this means unique /per feature/ where a feature may be split over several lines. The example GFF in the spec supports this interpretation.

To confirm the bug I created a copy of the canonical GFF3 example from the spec and reproduced this error (see above); the cds00001 feature is split over 4 lines, each with the same ID.

This is with bioperl release bioperl-1.5.2_102 on Linux i686, Perl v5.8.8

where is the Build.PL

I am a newbee. I have failed to install Bio-FeatureIO on Ubuntu 16 LTS following;

sudo cpan
install CPAN
reload cpan
install Bio::FeatureIO::gff

even trying to download the source code has failed since I cannot find the Build.PL file
Thanks

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

$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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.