Reading multiple matrix tables

this is intentional; a MatrixTable is already a composite object, so it shouldn’t be a common use case to glob them.

You can just iterate in Python. First, let’s define a helper function that makes a nested union N log N, not quadratic (see here for more info):

def union_cols_all(mts):
    mts = mts[:]

    iteration = 0
    while (len(mts) > 1):
        iteration += 1
        print(f'iteration {iteration}')
        tmp = []
        for i in range(0, len(mts), 2):
            tmp.append(mts[i].union_cols(mts[i+1]))
        mts = tmp[:]
    return mts[0]

And then read and union in Python:

files = [f'/path/to/chr{chrom}' for chrom in list(range(23)) + ['X', 'Y']]
mt = union_cols_all([hl.read_matrix_table(file) for file in files])