def blast(query, db, type, out, threads = '<STR_LIT:4>', maxtargets = '<STR_LIT:100>', megablast = False):
if os.path.exists(out) is False:<EOL><INDENT>db = blastdb(db) <EOL>print('<STR_LIT>' % (query, db))<EOL>if type == '<STR_LIT>':<EOL><INDENT>blast = '<STR_LIT>'<EOL>if megablast == True:<EOL><INDENT>blast = '<STR_LIT>'<EOL><DEDENT><DEDENT>else:<EOL><INDENT>blast = '<STR_LIT>'<EOL><DEDENT>os.system('<STR_LIT>'% (blast, query, db, out, maxtargets, threads))<EOL><DEDENT>else:<EOL><INDENT>print('<STR_LIT>' % (query, db))<EOL><DEDENT>
run blast