[BioPython] import Standalone problems

Rohini Damle rohini.damle at gmail.com
Tue Jul 18 19:38:42 UTC 2006


Hi,
I have a XML file with 4 blast records (for proteins P1, P2, P3, P4)
I am trying to extract alignment information for each of them.
So I wrote the following code:

 for b_record in b_iterator :

                E_VALUE_THRESH =20
                for alignment in b_record.alignments:
                       for hsp in alignment.hsps:
                       if hsp.expect< E_VALUE_THRESH:

                            print '****Alignment****'
                            print 'sequence:', alignment.title.split()[0]

With this code, I am getting information for P1,
then information for P1 + P2
then for P1+P2 +P3
and finally for P1+P2+P3+P4
why this is so?
is there something wrong with the looping?

Thank you for the help.
Rohini.



On 7/14/06, Rohini Damle <rohini.damle at gmail.com> wrote:
> Hi,
> I updated the NcbiStandalone.py file and then the program works fine.
> Thanks.
> Rohini.
>
> On 7/13/06, Peter <biopython at maubp.freeserve.co.uk> wrote:
> > Rohini Damle wrote:
> > > Hi,
> > > I am trying to use biopyton's xml parser to parse my blast result.
> > > Because of NCBI's changed XML output, the current biopython's parser
> > > fails.
> > >
> > > So I got an advice to run older version of blast locally and get the
> > > xml out put in older version and then use current XML parser.
> > > but I am getting an error
> > >
> > > SAXParseException: <unknown>:553:0: junk after document element
> > >
> > > what might be the reson?
> > >
> >
> > Not off hand.  We would usually ask to see the problem XML file...
> >
> > Do you get the same problem if you run Blast by hand, saving the output
> > to a file, and then trying to parse the XML file with BioPython?
> >
> > Also, which version of standalone blast are you using?
> >
> > Peter
> >
> >
>



More information about the Biopython mailing list