def filter_by_missing(max_miss=<NUM_LIT>):
def f(G, bim):<EOL><INDENT>Isnp = sp.isnan(G).mean(<NUM_LIT:0>) < max_miss<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 missing values
(takes maximum fraction of missing values, default is 0.01)