@profile<EOL>def error_statistics(target_scores, decoy_scores, parametric, pfdr, pi0_lambda, pi0_method = "<STR_LIT>", pi0_smooth_df = <NUM_LIT:3>, pi0_smooth_log_pi0 = False, compute_lfdr = False, lfdr_trunc = True, lfdr_monotone = True, lfdr_transf = "<STR_LIT>", lfdr_adj = <NUM_LIT>, lfdr_eps = np.power(<NUM_LIT>,-<NUM_LIT:8>)):
target_scores = to_one_dim_array(target_scores)<EOL>target_scores = np.sort(target_scores[~np.isnan(target_scores)])<EOL>decoy_scores = to_one_dim_array(decoy_scores)<EOL>decoy_scores = np.sort(decoy_scores[~np.isnan(decoy_scores)])<EOL>if parametric:<EOL><INDENT>target_pvalues = pnorm(target_scores, decoy_scores)<EOL><DEDENT>else:<EOL><INDENT>target_pvalues = pemp(target_scores, decoy_scores)<EOL><DEDENT>pi0 = pi0est(target_pvalues, pi0_lambda, pi0_method, pi0_smooth_df, pi0_smooth_log_pi0)<EOL>target_qvalues = qvalue(target_pvalues, pi0['<STR_LIT>'], pfdr)<EOL>metrics = stat_metrics(target_pvalues, pi0['<STR_LIT>'], pfdr)<EOL>error_stat = pd.DataFrame({'<STR_LIT>': target_scores, '<STR_LIT>': target_pvalues, '<STR_LIT>': target_qvalues, '<STR_LIT>': metrics['<STR_LIT>'], '<STR_LIT>': metrics['<STR_LIT>'], '<STR_LIT>': metrics['<STR_LIT>'], '<STR_LIT>': metrics['<STR_LIT>'], '<STR_LIT>': metrics['<STR_LIT>'], '<STR_LIT>': metrics['<STR_LIT>'], '<STR_LIT>': metrics['<STR_LIT>'], '<STR_LIT>': metrics['<STR_LIT>']})<EOL>if compute_lfdr:<EOL><INDENT>error_stat['<STR_LIT>'] = lfdr(target_pvalues, pi0['<STR_LIT>'], lfdr_trunc, lfdr_monotone, lfdr_transf, lfdr_adj, lfdr_eps)<EOL><DEDENT>return error_stat, pi0<EOL>
Takes list of decoy and target scores and creates error statistics for target values