human_format#

human_format(num)[source]#

Converts a number over 1000 to a string with 1 d.p and the corresponding letter. e.g. with input 24134, 24.1k as a string would be returned. This is used in the motif plots to make annotated heatmap cells more concise.

Parameters:

num (int) – number to be abbreviated

Returns:

number in abbreviated string format.

Return type:

str