BLASTp in python (solved)
1
0
Entering edit mode
8.5 years ago

I'm having some problems when running BLAST+ blastp from python.

What I have done is this:

from Bio.Blast.Applications import NcbiblastpCommandline
blastp_cline = NcbiblastpCommandline(query='target.fasta', out='target.out', db='/home/acastella/acastella/Database/pdbseq/PDBseq.fa')
print(blastp_cline)
blastp -out target.out -query target.fasta -db /home/acastella/acastella/Database/pdbseq/PDBseq.fa
stdout, stderr = blastb_cline()

and what I get is this:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/soft/devel/python-2.7/lib/python2.7/site-packages/biopython-1.62b-py2.7-linux-x86_64.egg/Bio/Application/__init__.py", line 488, in __call__
    stdout_str, stderr_str)
Bio.Application.ApplicationError: Command 'blastp -out hola.out -query target.fasta -db /home/acastella/acastella/Database/pdbseq/PDBseq.fa' returned non-zero exit status 127, '/bin/sh: blastp: command not found'

When I run this on command line directly blast runs perfectly and generate the file I want.

python blastp blast • 6.0k views
ADD COMMENT
0
Entering edit mode

How did you solve? Thanks

ADD REPLY
0
Entering edit mode

How did you solve the path issue

ADD REPLY
3
Entering edit mode
ADD COMMENT
0
Entering edit mode

Thanks now it works

ADD REPLY

Login before adding your answer.

Traffic: 1945 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6