def convert_chromosome(chromosome, dest='ensembl'):
    """
    Interconverts chromosome names from UCSC or Ensembl to the dialect specified by :param:`dest`

    :param chromosome:
    :param dest:
    :return:
    """
    if dest == 'ensembl':
        if chromosome == 'chrM':
            return 'MT'
        elif chromosome[:3].lower() == 'chr':
            return chromosome[3:]
        else:
            return chromosome
    elif dest == 'ucsc':
        if chromosome == 'MT':
            return 'chrM'
        elif chromosome[:3].lower() == 'chr':
            return chromosome
        else:
            return 'chr{}'.format(chromosome)
    else:
        raise ValueError('Unknown destination {}'.format(dest))
