Filter samples from MatrixTable

Hello,

i want to filter from MatrixTable only individuals(samples) of interest
I found in previous post:

mt.filter_rows(mt.s == ‘NA00001’)

which works for single sample, but how can I filter it if I have a list of samples such as:

samples = [‘NA00001’, ‘NA00002’]

mt.filter_cols(hl.array(samples).contains(mt.s))

1 Like