def get_regions(chr_pos):
    """
    Modified get_regions() to work with reference names that include an underscore
    Does the same thing as the usual get_regions from nanoRMS except, preserves the
    actual reference name, instead of only the first element after _ split

    Parameters
    ----------
    chr_pos : list
        List of character positions in the format "Reference-name_position"

    Returns
    -------
    regions : list of tuples
        Each tuple corresponds to its position in the format required by trace_df()

    """

    regions = [
        ("_".join(cp.split("_")[:-1]), int(cp.split("_")[-1]), "_") for cp in chr_pos
    ]
    return regions