from typing import Tuple


def _parse_dir_name(dirname: str, default_modality: str) -> Tuple[str, str]:
    """ Parse directory name to see if we can separate genome and modality """
    genome, sep, modality = dirname.rpartition('-')
    if genome == "":
        genome = dirname
        modality = default_modality
    return genome, modality