diff --git a/nb-configuration.xml b/nb-configuration.xml index 66defc5..81a4a3d 100644 --- a/nb-configuration.xml +++ b/nb-configuration.xml @@ -11,6 +11,9 @@ Without this configuration present, some functionality in the IDE may be limited + + psms + apache20 false + JDK_1.8 - - psms - diff --git a/pom.xml b/pom.xml index 502cf24..83d25bf 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.rappsilberlab xiFDR - 1.3.34 + 1.3.35 jar @@ -35,11 +35,6 @@ RUtils 1.0-SNAPSHOT - - ${project.groupId} - CSV - 1.0-SNAPSHOT - rappsilber XiSearch @@ -103,6 +98,11 @@ fastutil 7.2.1 + + ${project.groupId} + CSV + 1.0-SNAPSHOT + @@ -145,5 +145,5 @@ Application for FDR estimation cross-linking massspectrometry data - xiFDR-1.3.34 + xiFDR-1.3.35 diff --git a/src/main/java/org/rappsilber/fdr/CSVinFDR.java b/src/main/java/org/rappsilber/fdr/CSVinFDR.java index 4327b9e..ab1bc4a 100644 --- a/src/main/java/org/rappsilber/fdr/CSVinFDR.java +++ b/src/main/java/org/rappsilber/fdr/CSVinFDR.java @@ -359,26 +359,27 @@ public void readCSV(CsvParser csv, CsvCondition filter) throws FileNotFoundExcep ipeppos2[i] = Integer.parseInt(pepPositions2[i]); } + String run = crun == null ? "":csv.getValue(crun); + String scan = cscan == null ? "":csv.getValue(cscan); + String crosslinker = cCrosslinker == null ? "":csv.getValue(cCrosslinker); + double crosslinkerMass = cCrosslinkerMass == null ? -1:csv.getDouble(cCrosslinkerMass); + String negativeCase = null; + String poisitiveCase = null; + if (cNegativeGrouping != null && cNegativeGrouping >=0) { + negativeCase = csv.getValue(cNegativeGrouping); + if (negativeCase.isEmpty()) + negativeCase=null; + } + if (cPositiveGrouping != null && cPositiveGrouping >=0) { + poisitiveCase = csv.getValue(cPositiveGrouping); + if (poisitiveCase.isEmpty()) + poisitiveCase=null; + } + PSM psm = null; for (int p1 = 0; p1< accessions1.length; p1++) { for (int p2 = 0; p2< accessions2.length; p2++) { - String run = crun == null ? "":csv.getValue(crun); - String scan = cscan == null ? "":csv.getValue(cscan); - String crosslinker = cCrosslinker == null ? "":csv.getValue(cCrosslinker); - double crosslinkerMass = cCrosslinkerMass == null ? -1:csv.getDouble(cCrosslinkerMass); - String negativeCase = null; - String poisitiveCase = null; - if (cNegativeGrouping != null && cNegativeGrouping >=0) { - negativeCase = csv.getValue(cNegativeGrouping); - if (negativeCase.isEmpty()) - negativeCase=null; - } - if (cPositiveGrouping != null && cPositiveGrouping >=0) { - poisitiveCase = csv.getValue(cPositiveGrouping); - if (poisitiveCase.isEmpty()) - poisitiveCase=null; - } psm = addMatch(psmID, pepSeq1, pepSeq2, peplen1, peplen2, site1, site2, isDecoy1, isDecoy2, charge, score, @@ -407,9 +408,6 @@ public void readCSV(CsvParser csv, CsvCondition filter) throws FileNotFoundExcep } } - - - if (cInfo != null) { psm.setInfo(csv.getValue(cInfo)); } diff --git a/src/main/java/org/rappsilber/fdr/OfflineFDR.java b/src/main/java/org/rappsilber/fdr/OfflineFDR.java index dc56f8a..69a3404 100644 --- a/src/main/java/org/rappsilber/fdr/OfflineFDR.java +++ b/src/main/java/org/rappsilber/fdr/OfflineFDR.java @@ -759,7 +759,7 @@ public PSM addMatch(String psmID, Peptide peptide1, Peptide peptide2, int peplen score = 10 - (10 * score); } - PSM psm = new PSM(psmID, npepid1, npepid2, (byte) nsite1, (byte) nsite2, proteinId1.isDecoy(), proteinId2.isDecoy(), (byte) charge, score, peptide1Score, peptide2Score); + PSM psm = new PSM(psmID, npepid1, npepid2, (byte) nsite1, (byte) nsite2, nproteinId1.isDecoy(), nproteinId2.isDecoy(), (byte) charge, score, npeptide1Score, npeptide2Score); psm.setNegativeGrouping(isSpecialCase); psm.setRun(registerRun(run)); diff --git a/src/main/java/org/rappsilber/fdr/entities/PSM.java b/src/main/java/org/rappsilber/fdr/entities/PSM.java index 981ec68..ad25ccf 100644 --- a/src/main/java/org/rappsilber/fdr/entities/PSM.java +++ b/src/main/java/org/rappsilber/fdr/entities/PSM.java @@ -316,9 +316,18 @@ public boolean equals(Object l) { PSM c = (PSM) l; if (isNonCovalent != c.isNonCovalent) return false; + if (this.origScore != c.origScore) + return false; + if (this.crosslinker != c.crosslinker) + return false; + if (this.charge != c.charge) + return false; + + if (!this.psmID.contentEquals(c.psmID)) + return false; + // return this.score == c.score && this.charge == c.charge && this.psmID.contentEquals(c.psmID); - return this.origScore == c.origScore && this.crosslinker == c.crosslinker && this.charge == c.charge && this.psmID.contentEquals(c.psmID) && - ((((c.peptide1Score == this.peptide1Score &&c.peptide2Score == this.peptide2Score)) && c.peptide1.equals(this.peptide1) && c.peptide2.equals(this.peptide2) && c.pepsite1 == pepsite1 && c.pepsite2 == pepsite2) + return ((((c.peptide1Score == this.peptide1Score &&c.peptide2Score == this.peptide2Score)) && c.peptide1.equals(this.peptide1) && c.peptide2.equals(this.peptide2) && c.pepsite1 == pepsite1 && c.pepsite2 == pepsite2) || /* to be safe from binary inaccuracy we make an integer-comparison*/ ((c.peptide1Score == this.peptide2Score &&c.peptide2Score == this.peptide1Score) && c.peptide2.equals(this.peptide1) && c.peptide1.equals(this.peptide2) && c.pepsite2 == pepsite1 && c.pepsite1 == pepsite2)); } diff --git a/src/main/resources/xifdrproject.properties b/src/main/resources/xifdrproject.properties index 4fdff91..98b8ec7 100644 --- a/src/main/resources/xifdrproject.properties +++ b/src/main/resources/xifdrproject.properties @@ -1,6 +1,8 @@ xifdr.version=${project.version} xifdr.artifactId=${project.artifactId} xifdr.changelog=\ +1.3.35\n\ +* BugFix for ambiguous peptides\n\ 1.3.34\n\ * support for local FDR (PEP)\n\ * will read in and try to boost on delta score and peptide coverage\n\