[Biopython] NcbiblastxCommandline error

Yvan yvan.strahm at uni.no
Thu Feb 10 09:11:49 UTC 2011


On 10/02/11 03:02, Eric Talevich wrote:
> On Wed, Feb 9, 2011 at 5:07 PM, Gregorio Manuel Iraola Bentancor<
> goyo1987 at gmail.com>  wrote:
>
>> Hello, my name is Gregorio from Uruguay. I am trying to perform some local
>> blast in my machine, but I got this error:
>>
>> Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
>> [GCC 4.4.3] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> from Bio.Blast.Applications import NcbiblastxCommandline
>>>>> blastx_cline = NcbiblastxCommandline(cmd='blastx',db='K10909.fasta',
>> query='query.fasta',out='salida.xml')
>>>>> blastx_cline()
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in<module>
>> TypeError: 'NcbiblastxCommandline' object is not callable
>>
>> I do not know what is happening, because the same code runs well in other
>> computers. I would really appreciate any advice or solution.
>>
> Hi Gregorio,
>
> If the same code has worked on other machines, then you probably have
> different versions of Biopython installed on these machines. The
> "Commandline" objects became callable in Biopython version 1.55, but in
> earlier versions we would first serialize the command line as a string, then
> launch it as a subprocess.
>
> Can you update the Biopython installation on your local computer? If not,
> I'd recommend converting the NcbiblastxCommandline to a string --
> str(blastx_cline) -- then using os.system() or subprocess.call() to execute
> the command (the string).
>
> Most of the subprocess examples have been dropped from the current tutorial,
> but you can draw some inspiration for the Muscle section (look at the second
> example, which uses subprocess.Popen):
> http://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc77
>
>
> Best wishes,
> Eric
> _______________________________________________
> Biopython mailing list  -  Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
Hello,
I am not sure I am remembering well but seems I had this error message 
already. It was a blast version problem.
Did you check it?
my 2 cents
cheers,
yvan



More information about the Biopython mailing list