def blast_genome(seqs, blast_db, e_value, max_hits, word_size, working_dir, blast_mat_root, extra_params=[], DEBUG=True):
 params = {'-M': 'BLOSUM62', '-a': '1', '-e': e_value, '-b': max_hits, '-W': word_size, '-v': max_hits, '-m': '9', '-p': 'blastn'}
 params.update(extra_params)
 output = blast_seqs(seqs, Blastall, blast_db=blast_db, params=params, WorkingDir=working_dir, add_seq_names=False, blast_mat_root=blast_mat_root)
 raw_output = [x for x in output['StdOut']]
 return raw_output

def blast_genome ( seqs , blast_db , e_value , max_hits , word_size , working_dir , blast_mat_root , extra_params = [ ] , DEBUG = True ) : params = { '-M' : 'BLOSUM62' , '-a' : '1' , '-e' : e_value , '-b' : max_hits , '-W' : word_size , '-v' : max_hits , '-m' : '9' , '-p' : 'blastn' } params . update ( extra_params ) output = blast_seqs ( seqs , Blastall , blast_db = blast_db , params = params , WorkingDir = working_dir , add_seq_names = False , blast_mat_root = blast_mat_root ) raw_output = [ x for x in output [ 'StdOut' ] ] return raw_output
blast sequences against all genes in a genome seqs -- input sequences as strings blast_db -- path to blast database e_value -- e_value max_hits -- maximum sequences detected by blast to show word_size -- word size for initial blast screen .