def print_detailed_event_metrics(detailed_event_results):
    """
    Print totals for each event category

    Example:
        >>> print_detailed_event_metrics(test_r)
        Detailed event results:
             Actual events:
                 deletions:		1	12.50% of actual events
                 merged:		3	37.50% of actual events
                 fragmented:		1	12.50% of actual events
                 frag. and merged:	1	12.50% of actual events
                 correct:		2	25.00% of actual events
            Detected events:
                 insertions:		1	11.11% of detected events
                 merging:		1	11.11% of detected events
                 fragmenting:		4	44.44% of detected events
                 frag. and merging:	1	11.11% of detected events
                 correct:		2	22.22% of detected events

    """
    print('Detailed event results:')
    print('\tActual events:')
    print('\t\tdeletions:\t\t\t' + str(detailed_event_results['D']) + '\t' +
        '{0:.2f}'.format(detailed_event_results['D'] * 100 /
        detailed_event_results['total_gt']) + '% of actual events')
    print('\t\tmerged:\t\t\t\t' + str(detailed_event_results['M']) + '\t' +
        '{0:.2f}'.format(detailed_event_results['M'] * 100 /
        detailed_event_results['total_gt']) + '% of actual events')
    print('\t\tfragmented:\t\t\t' + str(detailed_event_results['F']) + '\t' +
        '{0:.2f}'.format(detailed_event_results['F'] * 100 /
        detailed_event_results['total_gt']) + '% of actual events')
    print('\t\tfrag. and merged:\t' + str(detailed_event_results['FM']) +
        '\t' + '{0:.2f}'.format(detailed_event_results['FM'] * 100 /
        detailed_event_results['total_gt']) + '% of actual events')
    print('\t\tcorrect:\t\t\t' + str(detailed_event_results['C']) + '\t' +
        '{0:.2f}'.format(detailed_event_results['C'] * 100 /
        detailed_event_results['total_gt']) + '% of actual events')
    print('\tDetected events:')
    print('\t\tinsertions:\t\t\t' + str(detailed_event_results["I'"]) +
        '\t' + '{0:.2f}'.format(detailed_event_results["I'"] * 100 /
        detailed_event_results['total_det']) + '% of detected events')
    print('\t\tmerging:\t\t\t' + str(detailed_event_results["M'"]) + '\t' +
        '{0:.2f}'.format(detailed_event_results["M'"] * 100 /
        detailed_event_results['total_det']) + '% of detected events')
    print('\t\tfragmenting:\t\t' + str(detailed_event_results["F'"]) + '\t' +
        '{0:.2f}'.format(detailed_event_results["F'"] * 100 /
        detailed_event_results['total_det']) + '% of detected events')
    print('\t\tfrag. and merging:\t' + str(detailed_event_results["FM'"]) +
        '\t' + '{0:.2f}'.format(detailed_event_results["FM'"] * 100 /
        detailed_event_results['total_det']) + '% of detected events')
    print('\t\tcorrect:\t\t\t' + str(detailed_event_results['C']) + '\t' +
        '{0:.2f}'.format(detailed_event_results['C'] * 100 /
        detailed_event_results['total_det']) + '% of detected events')
