[Biopython-dev] Need some help with SearchIO HSPs cascading attributes.

Kai Blin kai.blin at biotech.uni-tuebingen.de
Thu Dec 6 01:44:40 UTC 2012


On 2012-12-06 02:39, Wibowo Arindrarto wrote:

Hi Bow, everyone,

> Very happy to see the parser near completion (with tests too!). The
> issue you're facing is unfortunately the consequence of trying to keep
> attribute values in sync across the object hierarchy. It is a bit
> troublesome for now, but not without solution.

...

> Here, the simple fix would be to force a description assignment to the
> HSP. For example, you could have the `else` block like so:
> 
> ...
> else:
>     hit = unordered_hits[id_]
>     hsp.hit_description = hit.description
>     hit.append(hsp)

Thanks for the tip, that was the last speedbump I had. I just sent off
the pull request for the hmmer2 parser.

Thanks again for the help,
Kai

-- 
Dipl.-Inform. Kai Blin         kai.blin at biotech.uni-tuebingen.de
Institute for Microbiology and Infection Medicine
Division of Microbiology/Biotechnology
Eberhard-Karls-University of Tübingen
Auf der Morgenstelle 28                 Phone : ++49 7071 29-78841
D-72076 Tübingen                        Fax :   ++49 7071 29-5979
Deutschland
Homepage: http://www.mikrobio.uni-tuebingen.de/ag_wohlleben



More information about the Biopython-dev mailing list