Skip to content

Commit

Permalink
Fix a bug when there is no results in estimating FDR.
Browse files Browse the repository at this point in the history
  • Loading branch information
fcyu committed Feb 4, 2018
1 parent 6539f32 commit 63deabe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/proteomics/Validation/CalFDR.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public static Map<String, Entry> calFDR(String sqlPath, boolean cal_evalue, Stri
sqlConnection.close();

final int array_length = 1 + (int) Math.ceil((max_score - min_score) * inversePrecision);
if (array_length <= 0) { // there is no hit
return scanIdEntryMap;
}
double[] decoy_count_vector = new double[array_length];
double[] target_count_vector = new double[array_length];
double[] fuse_count_vector = new double[array_length];
Expand Down

0 comments on commit 63deabe

Please sign in to comment.