Entering edit mode
6.6 years ago
New2programming
•
0
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.