def transition_filename(tr):
    """Get the part of the filename specifying the transition (e.g. BKstar)
    from a transition string (e.g. B->K*)."""
    return tr.replace('->', '').replace('*', 'star')