marianne.stef at pmtg.u-bordeaux2.fr (Marianne Stef) writes:
> does anybody know if there is a BLAST software that return the sequences
> that didn't blast with any other sequence?
I had a request for a similar program and wrote a biopython script to
do this, you should be able to feed any blast report test file to this
program and get a list of querys that did not match anything.
# standard library
from Bio.Blast import NCBIStandalone
print """Usage: pepinoparse -b blastfile
parse a blast report, find any query with no hits, print the query name.
opts, args = getopt.getopt(sys.argv[1:], "hb:", ["help", "blast="])
# print help information and exit:
blast = None
for o, a in opts:
if o in ("-h", "--help"):
if o in ("-b", "--blast"):
blast = a
if blast == None:
blast_out = open(blast, "r")
b_parser = NCBIStandalone.BlastParser()
b_iterator = NCBIStandalone.Iterator(blast_out, b_parser)
b_record = b_iterator.next()
if b_record is None:
if len(b_record.alignments) == 0:
print b_record.query, "had no hits"
if __name__ == "__main__":
Humberto Ortiz Zuazaga
High Performance Computing facility
University of Puerto Rico