[Bioperl-l] Converting between allowed SearchIO formats?

Mark A. Jensen maj at fortinbras.us
Tue Sep 22 22:32:15 UTC 2009


Apropos this, here's something I ran across the other day:

"Just remember when using BioPerl that it was never designed
to 'round trip' your favorite formats. Rather, it was designed to
store sequence data from many widely different formats into a
common object framework and make that framework available
to other sequence manipulation tasks in a programmatic fashion."

from HOWTO:SeqIO#Caveats

Food for thought, anyway--- MAJ

----- Original Message ----- 
From: "Dan Bolser" <dan.bolser at gmail.com>
To: "Jason Stajich" <jason at bioperl.org>
Cc: "Chris Fields" <cjfields at illinois.edu>; "BioPerl List" 
<bioperl-l at lists.open-bio.org>
Sent: Tuesday, September 22, 2009 5:33 PM
Subject: Re: [Bioperl-l] Converting between allowed SearchIO formats?


> 2009/9/22 Jason Stajich <jason at bioperl.org>
>
>>
>>
>> However, the above method does not work here. Is this for some deep
>>
>> reason, or could the above method (based on the way SeqIO works) be
>>
>> made to work? I'm guessing that the SearchIO object conversion is
>>
>> simply harder to do than with SeqIO?
>>
>>
>> This is something Jason could probably speak up on, but from my perspective
>> it comes down to 'why?'.  This opens up a very hard-to-implement door
>> (converting to and from, for instance, BLAST to HMMER), which doesn't make
>> sense from the end-user perspective.  What most users want out of those
>> formats is getting at the data in an easily accessible way, to further
>> process them (filter, to GFF, etc), or to have them summarized.  the Writer
>> classes take care of the latter.
>>
>>
>> There is a very generic, all-purpose write_result in Bio::SearchIO that
>> just calls the a ResultWriter object (and dies if it isn't present).  Note
>> that this expects a ResultWriter, not a Hit/HSPWriter; it is write_result()
>> after all. I think this kind of goes against the well-established API that
>> exists with the other write_foo implementations for the IO classes, where
>> the input/output format should match, but there you have it.
>>
>> Dan -
>> I'm confused about what you are trying to do or what is broken - are you
>> just annoyed that the API isn't the same style as Bio::SeqIO.
>>
>
> No, I'm not annoyed. I was just confused initially because it didn't work as
> 'expected', and then I was wondering why (I was just curious). I take Chris's
> point that this could be a lot of work to implement for a very marginal use
> case.
>
> Very simply, what I am trying to do is this: a) read in a blasttable, b)
> filter the HSPs per 'result' (per query sequence), and c) write the HSPs out
> in blasttable format.
>
> I was stuck at step c, but I'm not saying anything is broken (just my
> understanding of how to use SearchIO::Writer::HSPTableWriter).
>
> I'll look again at Chris's suggestions to see if I can get code to just
> 'round trip' the blasttable format. From there I think I should be able to
> do what I want.
>
>
> Cheers,
> Dan.
>
>
> --
>> Jason Stajich
>> jason.stajich at gmail.com
>> jason at bioperl.org
>>
>>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
> 




More information about the Bioperl-l mailing list