[Biopython-dev] SearchIO wiki page & documentation

Wibowo Arindrarto bow at bow.web.id
Sat Sep 7 14:04:12 UTC 2013


Hi Peter,

Thanks. Comments are always welcomed :).

For the indent and increment argument, I actually prefer to keep them
separate. The reason is that having them in separate variables makes
it easier for the writer to navigate into or out of the levels.

The writer keeps track of which XML child element it is writing; and
it either increases or decreases the level (so it can print the proper
indentation). This is required since BLAST's XML tree does not really
map with the object model we are using. It is similar, but not the
same (e.g. the statistics tags are all children of a single element
that is not the query element, while in the object they are all flat
attributes of the query object). When it increases the element level,
I can understand that having indent and increment as one argument
makes it simpler. However, when the writer wants to go up a level (go
back to the parent level), it gets difficult with a combined indent &
increment variable, since Python strings do not work with the minus
operator (though it does work with the plus operator).

As for the frames, I tried to make it consistent with the way
SeqFeature stores it strands (-3 to 3, and None).

Best,
Bow

On Sat, Sep 7, 2013 at 3:44 PM, Peter Cock <p.j.a.cock at googlemail.com> wrote:
> Hi Bow,
>
> You've done a great job with the wiki page for SearchIO,
> http://biopython.org/wiki/SearchIO - thank you!
>
> One thing I wondered about on reading this is if for the
> BLAST XML output the optional indent and increment
> arguments could be combined into one - an indent
> string defaulting to two spaces?
>
> Also for frames, is there an existing Biopython precedent
> for this (-3 to 3)?
>
> Regards,
>
> Peter



More information about the Biopython-dev mailing list