[BioPython] Parser
Peter
biopython at maubp.freeserve.co.uk
Wed Feb 20 00:09:09 UTC 2008
Hi smriti.
That does look helpful. Assuming its not too big, could you email me
the psi_out file (off the list to avoid clogging up everyone email).
Once we sort this out, it would be a good idea for us to update the
PSI Blast section of the tutorial...
Peter
On Feb 19, 2008 6:00 PM, smriti Sebastian <smriti.sebastuan at gmail.com> wrote:
>
> Hi ,
> My code is like this:
>
> #!usr/bin/python
> fh=open('psi_out','r')
> import Bio
> from Bio.Blast import *
> import Bio.Blast.NCBIStandalone
> b_parser=Bio.Blast.NCBIStandalone.PSIBlastParser()
> b_record=b_parser.parse(fh)
>
> E_VALUE_THRESH=0.04
> for line in b_record.rounds:
>
> for record in line.descriptions:
> print record
>
> My error:
>
> Traceback (most recent call last):
> File "parse_psi.py", line 12, in <module>
> for record in line.descriptions:
> AttributeError: Round instance has no attribute 'descriptions'
Whatever the "line" object does, it seems it doesn't have a
"descriptions" attribute. What does dir(line) give?
Peter
More information about the Biopython
mailing list