Insert check on dimension of idx when apply resampling for fdr computation