Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
Biopython blast parsing skbrimer Bioinformatics 5 12-11-2014 10:57 AM
Different blast results between CLCBio and local blast arundurvasula Bioinformatics 0 07-01-2014 10:17 AM
Question: blast2go local www-blast not working AdrianP Bioinformatics 7 02-12-2014 01:15 AM
Standalone BLAST output format question dacotahm Bioinformatics 0 04-27-2012 09:51 AM
BLAST database error - when changing to new BLAST+ local program biobio Bioinformatics 4 06-15-2011 06:20 AM

Thread Tools
Old 05-03-2015, 11:24 AM   #1
Junior Member
Location: Slovenia

Join Date: Jul 2013
Posts: 7
Default Question: Is it possible to get local blast output directly in Biopython, without mak


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()
        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?
atape is offline   Reply With Quote
Old 05-04-2015, 01:08 AM   #2
Peter (Biopython etc)
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543

See answers on

Please don't cross-post the same question to multiple forums (without adding the links), as you waste people's time. There is a lot of overlap between the posters here and on BioStars.
maubp is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -8. The time now is 04:22 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO