def des_rank_mapper(des_rank, taxid, ncbi):
    """
    function for mapping a taxid to a desired rank.
    if des_rank is lower than rank of taxid, 0 is returned (to be filtered out later)
    :param des_rank:
    :param taxid:
    :param ncbi:
    :return:
    """
    dict_mapper = ncbi.map_id_to_desired_ranks([des_rank], int(taxid))
    if len(dict_mapper) == 1:
        return dict_mapper[des_rank]
    else:
        return 0
