[Biopython] PSI-BLAST

molly mutant mollymutant at googlemail.com
Wed Jul 20 14:19:35 UTC 2011


if it use cline() command:

        psi_cline = NcbipsiblastCommandline('psiblast', db =
'refseq_protein',\
                                            query = queryID+".fasta", evalue
=  10 , \
                                            out = queryID+"_psi.xml", outfmt
= 7, \
                                            out_pssm = queryID+"_pssm")
        str(psi_cline)
        psi_cline()

the following error occurs :
Traceback (most recent call last):
  File "psiBlast.py", line 113, in <module>
    psi_cline()
  File
"/usr/local/lib/python2.6/dist-packages/biopython-1.57-py2.6-linux-x86_64.egg/Bio/Application/__init__.py",
line 432, in __call__
    stdout_str, stderr_str)
Bio.Application.ApplicationError: Command 'psiblast -out NP_012649_psi.xml
-outfmt 7 -query NP_012649.fasta -db refseq_protein -evalue 10 -out_pssm
NP_012649_pssm' returned non-zero exit status 127, '/bin/sh: psiblast: not
found'

I think this error stands for that the command is not found, which means
that my command is incorrect, am i right??



On Wed, Jul 20, 2011 at 3:33 PM, molly mutant <mollymutant at googlemail.com>wrote:

> Oh, i forgot to mention :
>
> queryID here is a protein ID for example NP_010247.1
>  ' query = queryID+".fasta" ' is a fasta file for this protein.
> i want to get the XML output from the psi blast.
>
> Regards
> Molly
>
>
> On Wed, Jul 20, 2011 at 3:26 PM, molly mutant <mollymutant at googlemail.com>wrote:
>
>> 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
>>>>
>>>
>>>
>>>
>>
>
>
>


-- 
Regards,
Molly


More information about the Biopython mailing list