parameters: (completed, total, base_pairs=None, end_newline=False)
docstring: Logs a progress line using a carriage return to overwrite the previous progress line. Only the
      final progress line will be written to the log file.
docstring_summary: Logs a progress line using a carriage return to overwrite the previous progress line. Only the
      final progress line will be written to the log file.
docstring_tokens: Logs a progress line using a carriage return to overwrite the previous progress line . Only the final progress line will be written to the log file .
function: def log_progress_line(completed, total, base_pairs=None, end_newline=False):
      """
      Logs a progress line using a carriage return to overwrite the previous progress line. Only the
      final progress line will be written to the log file.
      """
      progress_str = int_to_str(completed) + ' / ' + int_to_str(total)
      if total > 0:
          percent = 100.0 * completed / total
      else:
          percent = 0.0
      progress_str += ' (' + '%.1f' % percent + '%)'
      if base_pairs is not None:
          progress_str += ' - ' + int_to_str(base_pairs) + ' bp'
  
      end_char = '\n' if end_newline else ''
      log('\r' + progress_str, end=end_char, write_to_log_file=False)
      if end_newline:
          log(progress_str, print_to_screen=False)
function_tokens: def log_progress_line ( completed , total , base_pairs = None , end_newline = False ) : progress_str = int_to_str ( completed ) + ' / ' + int_to_str ( total ) if total > 0 : percent = 100.0 * completed / total else : percent = 0.0 progress_str += ' (' + '%.1f' % percent + '%)' if base_pairs is not None : progress_str += ' - ' + int_to_str ( base_pairs ) + ' bp' end_char = '\n' if end_newline else '' log ( '\r' + progress_str , end = end_char , write_to_log_file = False ) if end_newline : log ( progress_str , print_to_screen = False )