def find_cutoff(tt_scores, td_scores, cutoff_fdr, parametric, pfdr, pi0_lambda, pi0_method, pi0_smooth_df, pi0_smooth_log_pi0):
error_stat, pi0 = error_statistics(tt_scores, td_scores, parametric, pfdr, pi0_lambda, pi0_method, pi0_smooth_df, pi0_smooth_log_pi0, False)<EOL>if not len(error_stat):<EOL><INDENT>raise click.ClickException("<STR_LIT>")<EOL><DEDENT>i0 = (error_stat.qvalue - cutoff_fdr).abs().idxmin()<EOL>cutoff = error_stat.iloc[i0]["<STR_LIT>"]<EOL>return cutoff<EOL>
Finds cut off target score for specified false discovery rate fdr