@staticmethod
def _shortener(x, renamer=None, max_char_len=20):
    """Shorten a feature ID to minimize the amount of messy text on plots

        Parameters
        ----------
        x : str
            A feature ID
        renamer : function, optional (default=None)
            A function to rename feature IDs to known gene symbols
        max_char_len : int, optional (default=20)
            Maximum length of the feature ids

        Returns
        -------
        shortened : str
            A potentially renamed, shortened string
        """
    if renamer is not None:
        renamed = renamer(x)
    else:
        renamed = x
    if isinstance(renamed, float):
        return renamed
    elif len(renamed) > max_char_len:
        return '{}...'.format(renamed[:max_char_len])
    else:
        return renamed
