Question: BLASTp in python (solved)
0
gravatar for albert.castella.teruel
5.3 years ago by
Spain
albert.castella.teruel10 wrote:

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.

blast blastp python • 4.1k views
ADD COMMENTlink modified 22 months ago by sambioinfo20180 • written 5.3 years ago by albert.castella.teruel10

How did you solve? Thanks

ADD REPLYlink written 3.0 years ago by bernhardretzl0

How did you solve the path issue

ADD REPLYlink written 22 months ago by sambioinfo20180
2
gravatar for Pierre Lindenbaum
5.3 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum133k wrote:

it's a PATH problem https://www.google.fr/search?q=site%3Abiostars.org+%22command+not+found

ADD COMMENTlink written 5.3 years ago by Pierre Lindenbaum133k

Thanks now it works

ADD REPLYlink written 5.3 years ago by albert.castella.teruel10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1818 users visited in the last hour
_