[Bioperl-l] Converting between allowed SearchIO formats?

Dan Bolser dan.bolser at gmail.com
Tue Sep 22 21:33:13 UTC 2009


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
>
>



More information about the Bioperl-l mailing list