def filter_by_maf(min_maf=<NUM_LIT>):
def f(G, bim):<EOL><INDENT>maf = <NUM_LIT:0.5> * G.mean(<NUM_LIT:0>)<EOL>maf[maf > <NUM_LIT:0.5>] = <NUM_LIT:1.0> - maf[maf > <NUM_LIT:0.5>]<EOL>Isnp = maf > min_maf<EOL>G_out = G[:, Isnp]<EOL>bim_out = bim[Isnp]<EOL>return G_out, bim_out<EOL><DEDENT>return f<EOL>
return function that filters by maf
(takes minimum maf, default is 0.01)