parameters: (in_filename, out_filename)
docstring: Converts a recognized genomics file `in_filename` to `out_filename`.
  
    Args:
      in_filename: str; filename of a genomics data file to use as input.
      out_filename: str; filename of a genomics data file to use as output, or
        None, if no output should be written.
  
    Raises:
      ConversionError, if the conversion could not be executed.
docstring_summary: Converts a recognized genomics file `in_filename` to `out_filename`.
docstring_tokens: Converts a recognized genomics file in_filename to out_filename .
function: def convert(in_filename, out_filename):
    """Converts a recognized genomics file `in_filename` to `out_filename`.
  
    Args:
      in_filename: str; filename of a genomics data file to use as input.
      out_filename: str; filename of a genomics data file to use as output, or
        None, if no output should be written.
  
    Raises:
      ConversionError, if the conversion could not be executed.
    """
    reader_class, writer_class = _reader_writer_classes(in_filename, out_filename)
    reader = reader_class(in_filename)
  
    with reader_class(in_filename) as reader:
      with writer_class(out_filename, header=reader.header) as writer:
        start = time.time()
        i = 0
        for record in reader:
          i += 1
          writer.write(record)
          logging.log_every_n(logging.INFO, "Progress: %d records", LOG_EVERY, i)
        elapsed = time.time() - start
        logging.info("Done, processed %d records in %0.2f seconds.", i, elapsed)
function_tokens: def convert ( in_filename , out_filename ) : reader_class , writer_class = _reader_writer_classes ( in_filename , out_filename ) reader = reader_class ( in_filename ) with reader_class ( in_filename ) as reader : with writer_class ( out_filename , header = reader . header ) as writer : start = time . time ( ) i = 0 for record in reader : i += 1 writer . write ( record ) logging . log_every_n ( logging . INFO , "Progress: %d records" , LOG_EVERY , i ) elapsed = time . time ( ) - start logging . info ( "Done, processed %d records in %0.2f seconds." , i , elapsed )