I'm trying to run a PSIBlast program which selects certain sequences out at every round before it does the next iteration. For this I need the Round attribute shown in http://biopython.org/DIST/docs/tutorial/Tutorial.html#fig:psiblastrecord.<br< a="">> The biopython tutorial says: "In Biopython, the parsers return Record objects, either Blast or PSIBlast depending on what you are parsing." However, I can only access attributes found in the normal Blast record class: http://biopython.org/DIST/docs/tutorial/Tutorial.html#fig:blastrecord.
from Bio.Blast.Applications import NcbipsiblastCommandline
from Bio import SeqIO
from Bio.Blast import NCBIXML
File = "KNATM"
def psiBlast(File):
fastaFile = open("BLAST-"+File+".txt","r")
my_blast_db = r"C:\Niek\Test2.2.17\TAIR9_pep_20090619.fasta"
my_blast_file = '"C:\\Niek\\Evolution MiP\\BLAST-'+File+'.txt"'
my_blast_exe = r"C:\Niek\blast-2.2.24+\bin\psiblast.exe"
E_VALUE_TRESH = "10"
for seq_record in SeqIO.parse("BLAST-"+File+".txt", "fasta"):
global cline
tempFile = open("tempFile.fasta","w")
tempFile.write(">"+str(seq_record.id)+"\n"+str(seq_record.seq)+"\n")
tempFile.close()
cline = NcbipsiblastCommandline(cmd = my_blast_exe, db = my_blast_db, \
query = ...