Split up the column data in a biom table by mapping category value.

def split_by_category(biom_cols, mapping, category_id):
    """
    Split up the column data in a biom table by mapping category value.
    """
    columns = defaultdict(list)
    for i, col in enumerate(biom_cols):
        columns[mapping[col['id']][category_id]].append((i, col))

    return columns