Skip to content

Commit

Permalink
Fix a bug in estimating FDR when there is no target hit.
Browse files Browse the repository at this point in the history
  • Loading branch information
fcyu committed Nov 16, 2016
1 parent e7fcc50 commit 6bf83c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>hk.ust.bioinformatics</groupId>
<artifactId>ECL</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
<packaging>jar</packaging>

<name>ECL</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/proteomics/SearchMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
public class SearchMain {

private static final Logger logger = LoggerFactory.getLogger(SearchMain.class);
private static final String version = "1.1.0";
private static final String version = "1.1.1";

public static void main(String[] args) throws Exception {
// Process inputs
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/proteomics/Validation/CalFDR.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ public CalFDR(List<FinalResultEntry> results) {
}

float fdr;
if (fuse_count < decoy_count) {
if ((target_count == 0) && ((decoy_count > 0) || (fuse_count > 0))) {
fdr = 1;
} else if ((target_count == 0) && (decoy_count == 0) && (fuse_count == 0)) {
fdr = 0;
} else if (fuse_count < decoy_count) {
fdr = (float) decoy_count / (float) target_count;
} else {
fdr = (float) (fuse_count - decoy_count) / (float) target_count;
Expand Down

0 comments on commit 6bf83c1

Please sign in to comment.