Question: NcbiblastpCommandline , not working properly in python but commands work on console
0
gravatar for New2programming
15 months ago by
New2programming0 wrote:

I'm trying to automate blast outputs from several files in a directory. Variables here are hardcoded but will be user defined later on. My infiles will be changed via a loop but i'm having issues running NcbiblastpCommandline on the files from within python.

from Bio.Blast.Applications import NcbiblastpCommandline
E_Value_Thresh=1e-10
counter=1
Filename2= 'Batch' + str(counter)
NcbiblastpCommandline.outfile=Filename2
 from Bio.Blast.Applications import NcbiblastpCommandline
cline = NcbiblastpCommandline(query="minifasta.fasta", db="uniprot_database",outfmt=6, out=Filename2, evalue= E_Value_Thresh)
stdt,stdr= cline
cline()
NcbiblastpCommandline(cmd='blastp', query="minifasta.fasta", db="uniprot_database", outfmt=6, evalue= E_Value_Thresh)

I keep receiving an error saying ''NcbiblastpCommandline' object is not iterable.' and i'm being directed to the stdt,stdr line but without stdt,stdr another error saying the command isnt recogised comes up and error messages directing to stdout_str, stderr_str. I cant find up to date examples of NcbiblastpCommandline usage in python 3 to guide me.

ADD COMMENTlink modified 13 months ago by Biostar ♦♦ 20 • written 15 months ago by New2programming0
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: 1689 users visited in the last hour