def _handle_convert(in_handle, in_format, out_handle, out_format, alphabet=None):
 try:
  f = _converter[(in_format, out_format)]
 except KeyError:
  f = None
 if f:
  return f(in_handle, out_handle, alphabet)
 else:
  records = SeqIO.parse(in_handle, in_format, alphabet)
  return SeqIO.write(records, out_handle, out_format)

def _handle_convert ( in_handle , in_format , out_handle , out_format , alphabet = None ) : try : f = _converter [ ( in_format , out_format ) ] except KeyError : f = None if f : return f ( in_handle , out_handle , alphabet ) else : records = SeqIO . parse ( in_handle , in_format , alphabet ) return SeqIO . write ( records , out_handle , out_format )
seqio conversion function .