[Bioperl-l] reading and writing GFF3

Robert Buels rmb32 at cornell.edu
Fri Jun 16 20:31:08 UTC 2006


Rather than cobble together some ad-hoc solution, I would be interested 
in working on a good solution to this problem, because it seems like 
it's just going to get more common as more people start wanting to write 
GFF3.  What about some code in whatever customarily makes these objects 
(probably BSF::Annotated's new() method?) that could take another type 
of Feature object and attempt to shoehorn its data into a new 
BSF::Annotated?  If it failed (because the type isn't in SO or 
whatever), it could throw() some informative error message.

Then, people could write straightforward code something like:

while(my $oldstylefeature = $features_in->next_feature) {
    $oldstylefeature->primary_tag('something_that_is_in_so');
    $oldstylefeature->something_else('some other something that needs to 
be changed for compliance');
    my $newfeature = Bio::SeqFeature::Annotated->new($oldstylefeature);
    $gff3_out->write_feature($newfeature);
}

Does that sound like a good idea?  I'd be more than willing to implement 
this, since I'm going to need to do this sort of thing with many more 
things than just RepeatMasker.

Rob

Scott Cain wrote:
> Um, yeah, good question.  The reason I didn't answer you when you wrote
> before is that I was hoping for divine inspiration for an answer (or for
> somebody else to answer, which would have been really great :-)
>
> The short answer (and easy one for me to type) is that you will probably
> need an ad hoc method to do it, which is the same thing I do when I need
> to convert gff2 to gff3, to make sure the things I need mapped get
> mapped the 'right' way (that is, the way I want them to go).  I don't
> have any sample code that does this, but if you want to start working up
> an ad hoc method, I will certainly try to help you as much as I can.
>
> Scott
>
>
> On Fri, 2006-06-16 at 12:34 -0700, Robert Buels wrote:
>   
>> So about that converting ye olde feature objects into 
>> Bio::SeqFeature::Annotated objects.  How do I do it?
>>
>>
>> Scott Cain wrote:
>>     
>>> That's OK--You added a few items that should be escaped that weren't, so
>>> I added those too.
>>>
>>> Thanks,
>>> Scott
>>>
>>>
>>> On Fri, 2006-06-16 at 12:30 -0700, Robert Buels wrote:
>>>   
>>>       
>>>> Woops, I should have said something about that.  I submitted it before
>>>> I saw that Scott had already done the escaping in CVS.
>>>>
>>>> Chris Fields wrote: 
>>>>     
>>>>         
>>>>> Scott, 
>>>>>
>>>>> Looks like Robert also submitted a bug report related to this as well=
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>> _______________________________________________
>>>>> Bioperl-l mailing list
>>>>> Bioperl-l at lists.open-bio.org
>>>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l

-- 
Robert Buels
SGN Bioinformatics Analyst
252A Emerson Hall, Cornell University
Ithaca, NY  14853
Tel: 503-889-8539
rmb32 at cornell.edu
http://www.sgn.cornell.edu





More information about the Bioperl-l mailing list