Example #1
0
    def generate_itol_ltoi(labels):
        """Method that generates itol and ltoi

        Args:
            labels: List of labels

        Returns:
            pair of dict: itol, ltoi

        """
        itol = Utils.convert_list_to_dict(labels)
        ltoi = Utils.reserve_dict(itol)
        return itol, ltoi
Example #2
0
def test_reserve_dict():
    items = Utils.reserve_dict({0: "carbon", 1: "hydrogen", 2: "oxygen"})
    assert (items['carbon'] == 0)
    assert (items['hydrogen'] == 1)
    assert (items['oxygen'] == 2)