Hi
I am currently filtering through a large amount of reads from a 454 machine. I would like to blast every read against a local blast database and check if the sequence is indeed from a targeted genus/species and not a contaminant. For that I would like to get a direct output to python, so I can read it directly and filter it out if the top matches aren't from the same genus or if the score is too low.
for seq in SeqIO.parse(fasta_file, "fasta"):
counter +=1
blast_cline = NcbiblastnCommandline(query="G:\\454 dataset\\new2.fasta", db="database", evalue=0.001, outfmt=5, out="G:\\454 dataset\\blast2.xml")
stdout, stderr = blast_cline()
print(stdout,stderr)
if counter == 1: break
Also I would like to give the query sequence from parsing through the file, as it stands it gets the query from the "new2,fasta" file. The counter and the break are temporarily there, till I find a way to get it to accept the seq variable as its query input.
How could I get a stdout output from the local blast? Also is it possible to give the query input a variable and not a file?
cross posted: http://seqanswers.com/forums/showthread.php?t=58260