[Biopython] PSI-BLAST

molly mutant mollymutant at googlemail.com
Wed Jul 20 13:26:33 UTC 2011


hello all,

I was also trying to run my program using the same wrapper from
Bio.Blast.Application for psiblast commandline.

i use the following code but this is not generating XML file.
        psi_cline = NcbipsiblastCommandline('psiblast', db =
'refseq_protein', query = queryID+".fasta", evalue =  10 , out =
queryID+"_psi.xml", outfmt = 7, out_pssm = queryID+"_pssm")
        p =
subprocess.Popen(str(psi_cline),stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=(sys.platform!="win32"))
        blastParser(p.stdout)

i have defined blastParser for parsing XML files which works perfectly with
other xml files.

i get the following error :

Traceback (most recent call last):
  File "psiBlast.py", line 110, in <module>
    blastParser(p.stdout)

  File
"/usr/local/lib/python2.6/dist-packages/biopython-1.57-py2.6-linux-x86_64.egg/Bio/Blast/NCBIXML.py",
line 617, in parse
    raise ValueError("Your XML file was empty")
ValueError: Your XML file was empty


you can see that i am using python 2.6 and Biopython 1.57. Do you know where
am i going incorrect?

Molly

On Wed, Jul 20, 2011 at 3:07 PM, malvika sharan <malvikasharan at gmail.com>wrote:

>
>
> ---------- Forwarded message ----------
>
>
> Thank you Peter and Eric.
>
> you are right and i think i should have known this :(
> I updated Biopython. and revising my codes. it should work now.
>
> Malvika
>
>
> On Tue, Jul 19, 2011 at 8:08 AM, Peter Cock <p.j.a.cock at googlemail.com>wrote:
>
>> On Monday, July 18, 2011, Eric Talevich <eric.talevich at gmail.com> wrote:
>> > On Sun, Jul 17, 2011 at 7:27 PM, malvika sharan <
>> malvikasharan at gmail.com>wrote:
>> >
>> >> My OS is mac, Python is 2.7 as mentioned,Biopython 1.50.
>> >>
>> >
>> > That's a very old version of Biopython. Are you able to install a more
>> > recent version?
>> >
>> >
>> > And well as i said that the the error shows at the import.
>> >> import os, sys
>> >> from Bio import SeqIO
>> >> from Bio import Entrez
>> >> from Bio.Blast import NCBIWWW*
>> >> *from Bio.Blast.NCBIStandalone import PSIBlastParser
>> >> *from Bio.Blast.Applications import NcbipsiblastCommandline*
>> >> from Bio.Blast import NCBIXML
>> >>
>> >
>> > If the earlier imports of SeqIO and Entrez work, then
>> > NcbipsiblastCommandline probably wasn't included in Biopython 1.50, I
>> would
>> > guess.
>> >
>>
>> Correct. The BLAST+ wrappers were added in Biopython 1.53.
>> You will need to update it, ideally to the current release, 1.57
>>
>> In general if some imports work and others fail, your library
>> Is either too old (and what you want didn't exist in the old
>> version), or too new (the code you want to use was obsolete
>> and removed).
>>
>> Peter
>>
>
>
>



More information about the Biopython mailing list