Skip to content

Commit

Permalink
Output "-" in the e-value column if cal_evalue = false.
Browse files Browse the repository at this point in the history
  • Loading branch information
fcyu committed May 18, 2017
1 parent bc64446 commit 608dee3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/proteomics/ECL2.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ private static void saveTargetResult(List<FinalResultEntry> result, Map<String,
String annotate_2 = pro_annotate_map.get(pro_2).replace(",", ";");

if (dev) {
writer.write(re.scan_num + "," + re.spectrum_id + "," + re.spectrum_mz + "," + re.spectrum_mass + "," + re.peptide_mass + "," + re.rt + "," + re.C13_correction + "," + re.charge + "," + String.format("%.4f", re.score) + "," + re.delta_c + "," + String.format("%.2f", re.ppm) + "," + re.seq_1 + "-" + link_site_1 + "-" + re.seq_2 + "-" + link_site_2 + "," + re.pro_id_1 + "-" + re.pro_id_2 + ',' + annotate_1 + "," + annotate_2 + "," + String.format("%E", re.e_value) + "," + String.format("%.4f", re.qvalue) + ",," + re.candidate_num + "," + re.point_count + "," + String.format("%.4f", re.r_square) + "," + String.format("%.4f", re.slope) + "," + String.format("%.4f", re.intercept) + "," + re.start_idx + "," + re.end_idx + "," + String.format("%.4f", re.chain_score_1) + "," + re.chain_rank_1 + "," + String.format("%.4f", re.chain_score_2) + "," + re.chain_rank_2 + "\n");
writer.write(re.scan_num + "," + re.spectrum_id + "," + re.spectrum_mz + "," + re.spectrum_mass + "," + re.peptide_mass + "," + re.rt + "," + re.C13_correction + "," + re.charge + "," + String.format("%.4f", re.score) + "," + re.delta_c + "," + String.format("%.2f", re.ppm) + "," + re.seq_1 + "-" + link_site_1 + "-" + re.seq_2 + "-" + link_site_2 + "," + re.pro_id_1 + "-" + re.pro_id_2 + ',' + annotate_1 + "," + annotate_2 + "," + (cal_evalue ? String.format("%E", re.e_value) : "-") + "," + String.format("%.4f", re.qvalue) + ",," + re.candidate_num + "," + re.point_count + "," + String.format("%.4f", re.r_square) + "," + String.format("%.4f", re.slope) + "," + String.format("%.4f", re.intercept) + "," + re.start_idx + "," + re.end_idx + "," + String.format("%.4f", re.chain_score_1) + "," + re.chain_rank_1 + "," + String.format("%.4f", re.chain_score_2) + "," + re.chain_rank_2 + "\n");
} else {
writer.write(re.scan_num + "," + re.spectrum_id + "," + re.spectrum_mz + "," + re.spectrum_mass + "," + re.peptide_mass + "," + re.rt + "," + re.C13_correction + "," + re.charge + "," + String.format("%.4f", re.score) + "," + re.delta_c + "," + String.format("%.2f", re.ppm) + "," + re.seq_1 + "-" + link_site_1 + "-" + re.seq_2 + "-" + link_site_2 + "," + re.pro_id_1 + "-" + re.pro_id_2 + ',' + annotate_1 + "," + annotate_2 + "," + String.format("%E", re.e_value) + "," + String.format("%.4f", re.qvalue) + "\n");
}
Expand Down Expand Up @@ -265,7 +265,7 @@ private static void saveDecoyResult(List<FinalResultEntry> result, Map<String, S
if (dev) {
writer.write(re.scan_num + "," + re.spectrum_id + "," + re.spectrum_mz + "," + re.spectrum_mass + "," + re.peptide_mass + "," + re.rt + "," + re.C13_correction + "," + re.charge + "," + String.format("%.4f", re.score) + "," + re.delta_c + "," + String.format("%.2f", re.ppm) + "," + re.seq_1 + "-" + link_site_1 + "-" + re.seq_2 + "-" + link_site_2 + "," + re.pro_id_1 + "-" + re.pro_id_2 + ',' + annotate_1 + "," + annotate_2 + "," + String.format("%E", re.e_value) + ",," + re.candidate_num + "," + re.point_count + "," + String.format("%.4f", re.r_square) + "," + String.format("%.4f", re.slope) + "," + String.format("%.4f", re.intercept) + "," + re.start_idx + "," + re.end_idx + "," + String.format("%.4f", re.chain_score_1) + "," + re.chain_rank_1 + "," + String.format("%.4f", re.chain_score_2) + "," + re.chain_rank_2 + "\n");
} else {
writer.write(re.scan_num + "," + re.spectrum_id + "," + re.spectrum_mz + "," + re.spectrum_mass + "," + re.peptide_mass + "," + re.rt + "," + re.C13_correction + "," + re.charge + "," + String.format("%.4f", re.score) + "," + re.delta_c + "," + String.format("%.2f", re.ppm) + "," + re.seq_1 + "-" + link_site_1 + "-" + re.seq_2 + "-" + link_site_2 + "," + re.pro_id_1 + "-" + re.pro_id_2 + ',' + annotate_1 + "," + annotate_2 + "," + String.format("%E", re.e_value) + "," + String.format("%.4f", re.qvalue) + "\n");
writer.write(re.scan_num + "," + re.spectrum_id + "," + re.spectrum_mz + "," + re.spectrum_mass + "," + re.peptide_mass + "," + re.rt + "," + re.C13_correction + "," + re.charge + "," + String.format("%.4f", re.score) + "," + re.delta_c + "," + String.format("%.2f", re.ppm) + "," + re.seq_1 + "-" + link_site_1 + "-" + re.seq_2 + "-" + link_site_2 + "," + re.pro_id_1 + "-" + re.pro_id_2 + ',' + annotate_1 + "," + annotate_2 + "," + (cal_evalue ? String.format("%E", re.e_value) : "-") + "," + String.format("%.4f", re.qvalue) + "\n");
}
}
}
Expand Down

0 comments on commit 608dee3

Please sign in to comment.