def get_col_names_and_indices(tbl, ignore_gt_cols=False):
    """Return a list of column names and a list of the row indices.
       Optionally exclude gt_* columns.
    """
    inames = [(i, c) for i, c in enumerate(tbl.columns)]
    if ignore_gt_cols:
        inames = [x for x in inames if not (x[1].startswith("gt") and
                  x[1].type.__class__.__name__.upper() == "BLOB")]

    return [x[1].name for x in inames], [x[0] for x in inames]