def get_loci_fasta(loci, out_fa, ref):
if not find_cmd("<STR_LIT>"):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>with make_temp_directory() as temp:<EOL><INDENT>bed_file = os.path.join(temp, "<STR_LIT>")<EOL>for nc, loci in loci.iteritems():<EOL><INDENT>for l in loci:<EOL><INDENT>with open(bed_file, '<STR_LIT:w>') as bed_handle:<EOL><INDENT>logger.debug("<STR_LIT>" % l)<EOL>nc, c, s, e, st = l<EOL>print("<STR_LIT>".format(c, s, e, nc, st), file=bed_handle)<EOL><DEDENT>get_fasta(bed_file, ref, out_fa)<EOL><DEDENT><DEDENT><DEDENT>return out_fa<EOL>
get fasta from precursor