Could anyone please explain the rationale behind gff3 being part of the Bio::Tools rather than being another sequence parser? Or is this just a module that no one has implemented yet and still needs to be written?
Could anyone please explain the rationale behind gff3 being part of the Bio::Tools rather than being another sequence parser? Or is this just a module that no one has implemented yet and still needs to be written?
Are you perhaps just looking at the wrong module? GFF3 is supported by Bio::FeatureIO
, which lets you access the GFF3 file contents in various ways (http://doc.bioperl.org/bioperl-live/Bio/FeatureIO.html).
For example, I took a GFF3 file example from http://gmod.org/wiki/GFF and saved it in test.gff3
with the following contents:
##gff-version 3
ctg123 . operon 1300 15000 . + . ID=operon001;Name=superOperon
ctg123 . mRNA 1300 9000 . + . ID=mrna0001;Parent=operon001;Name=sonichedgehog
ctg123 . exon 1300 1500 . + . Parent=mrna0001
ctg123 . exon 1050 1500 . + . Parent=mrna0001
ctg123 . exon 3000 3902 . + . Parent=mrna0001
ctg123 . exon 5000 5500 . + . Parent=mrna0001
ctg123 . exon 7000 9000 . + . Parent=mrna0001
ctg123 . mRNA 10000 15000 . + . ID=mrna0002;Parent=operon001;Name=subsonicsquirrel
ctg123 . exon 10000 12000 . + . Parent=mrna0002
ctg123 . exon 14000 15000 . + . Parent=mrna0002
Note: The empty spaces in the GFF3 above need to be replaced by tabs.
I then created gff3.pl
, which looks like:
use strict;
use Bio::FeatureIO;
# Open GFF file:
my $gff = Bio::FeatureIO->new(-file => 'test.gff3', -format => 'gff', -version => 3);
# Iterate through the file, feature-by-feature:
while(my $feature = $gff->next_feature) {
print $feature, "\n";
}
Running perl gff3.pl
goes though all the features in the GFF3 file.
Having said that, there is also a GFF3 implementation in BioRuby, which is explained with many examples here: http://thebird.nl/bioruby/BioRuby_GFF3.html
Hope that helps.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
It helps if you tell us which language/library you're talking about. I assume Bioperl?
I really wish that changing tags was still possible. That way it would be much easier to address these problems.
you can change the tags by editing the post
I really wish that adding tags used auto-suggest. Might go some way to preventing people inventing a new tag for every question.
I'll try to add that next week on the coding sprint
Sorry, but I don't see how. I can edit my answer, where I have no control over tags of the question. Everything else appears non-editable to me.
ok, forgot to mention that only the original author and moderators may edit a post and thus change the tags