This project has moved. For the latest updates, please go here.

Help needed related to csb.bio.io.hhpred

Aug 13, 2013 at 9:35 PM
Hey, this is a very nice work. I am new to python, though I code in perl. I was using the csb parser to parse the hhsearch output using the function HHOutputParser(). This gives me as output how many hhpred hits are there in the .hhr file.

If i want to display the hits name along with the probability values, how should I procees. This might sound a very trivial question, but as I am quite new to python, so I am asking it.

Any help will be very useful.

Thanks
SWATI
Coordinator
Aug 13, 2013 at 10:54 PM
Hi Swati,

HHOutputParser builds an HHpredHitList object, which holds a collection of HHpredHit-s. You can access their properties in this way:
hits = HHOutputParser().parse_file(...)
for hit in hits:
    print(hit.id, hit.probability)
To get the complete list of supported properties, you can extract the API docs from the release package and navigate to "csb.bio.hmm.HHpredHit". Check also "csb.bio.hmm.HHpredHitList" and "csb.bio.io.hhpred.HHOutputParser".

Cheers,
Ivan
Aug 13, 2013 at 11:26 PM
Thanks Ivan, It worked :-)

Swati