Skip to content

Commit

Permalink
Version 1.0.23 Turned peptide and protein IDs into longs as integers …
Browse files Browse the repository at this point in the history
…where in the internal database exceeded.
  • Loading branch information
lfischer committed Jan 10, 2018
1 parent 961497f commit 808efb3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 16 deletions.
7 changes: 7 additions & 0 deletions doc/xiFDR.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SET mypath=%~dp0
java -jar %mypath%xiFDR-1.0.22-jar-with-dependencies.jar
if NOT ["%errorlevel%"]==["0"] (
pause
exit /b %errorlevel%
)
exit
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.rappsilberlab</groupId>
<artifactId>xiFDR</artifactId>
<version>1.0.22</version>
<version>1.0.23</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/org/rappsilber/fdr/OfflineFDR.java
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,10 @@ public PSM addMatch(String psmID, String pepSeq1, String pepSeq2, int peplen1, i
}
public PSM addMatch(String psmID, String pepSeq1, String pepSeq2, int peplen1, int peplen2, int site1, int site2, boolean isDecoy1, boolean isDecoy2, int charge, double score, String accession1, String description1, String accession2, String description2, int pepPosition1, int pepPosition2, double scoreRatio, boolean isSpecialCase, String crosslinker, String run, String scan) {

int pepid1 = m_pepIDs.toIntValue(pepSeq1);
int pepid2 = m_pepIDs.toIntValue(pepSeq2);
int protid1 = m_protIDs.toIntValue(accession1);
int protid2 = m_protIDs.toIntValue(accession2);
long pepid1 = m_pepIDs.toIntValue(pepSeq1);
long pepid2 = m_pepIDs.toIntValue(pepSeq2);
long protid1 = m_protIDs.toIntValue(accession1);
long protid2 = m_protIDs.toIntValue(accession2);


//return addMatch(pepSeq2, pepSeq1, accession1, accession2, protid1, description2, isDecoy1, pepid1, pepPosition1, peplen1, protid2, isDecoy2, pepid2, pepPosition2, peplen2, psmID, site1, site2, charge, score, scoreRatio, isSpecialCase);
Expand Down Expand Up @@ -4248,17 +4248,17 @@ protected String getPeptideSequence(Peptide p) {



public PSM addMatch(String psmID, String run, String scan, Integer pepid1, Integer pepid2, String pepSeq1, String pepSeq2, int peplen1, int peplen2, int site1, int site2, boolean isDecoy1, boolean isDecoy2, int charge, double score, Integer protid1, String accession1, String description1, Integer protid2, String accession2, String description2, int pepPosition1, int pepPosition2, double scoreRatio, boolean isSpecialCase, String crosslinker) {
public PSM addMatch(String psmID, String run, String scan, Long pepid1, Long pepid2, String pepSeq1, String pepSeq2, int peplen1, int peplen2, int site1, int site2, boolean isDecoy1, boolean isDecoy2, int charge, double score, Long protid1, String accession1, String description1, Long protid2, String accession2, String description2, int pepPosition1, int pepPosition2, double scoreRatio, boolean isSpecialCase, String crosslinker) {
return addMatch(psmID, run, scan, pepid1, pepid2, pepSeq1, pepSeq2, peplen1, peplen2, site1, site2, isDecoy1, isDecoy2, charge, score, protid1, accession1, description1, protid2, accession2, description2, pepPosition1, pepPosition2, "", "", scoreRatio, isSpecialCase, crosslinker);
}

public PSM addMatch(String psmID, String run, String scan, Integer pepid1, Integer pepid2, String pepSeq1, String pepSeq2, int peplen1, int peplen2, int site1, int site2, boolean isDecoy1, boolean isDecoy2, int charge, double score, Integer protid1, String accession1, String description1, Integer protid2, String accession2, String description2, int pepPosition1, int pepPosition2, String Protein1Sequence, String Protein2Sequence, double scoreRatio, boolean isSpecialCase, String crosslinker) {
public PSM addMatch(String psmID, String run, String scan, Long pepid1, Long pepid2, String pepSeq1, String pepSeq2, int peplen1, int peplen2, int site1, int site2, boolean isDecoy1, boolean isDecoy2, int charge, double score, Long protid1, String accession1, String description1, Long protid2, String accession2, String description2, int pepPosition1, int pepPosition2, String Protein1Sequence, String Protein2Sequence, double scoreRatio, boolean isSpecialCase, String crosslinker) {
PSM ret = addMatch(psmID, pepid1, pepid2, pepSeq1, pepSeq2, peplen1, peplen2, site1, site2, isDecoy1, isDecoy2, charge, score, protid1, accession1, description1, protid2, accession2, description2, pepPosition1, pepPosition2, Protein1Sequence, Protein2Sequence, scoreRatio, isSpecialCase, crosslinker, run, scan);
return ret;

}

public PSM addMatch(String psmID, Integer pepid1, Integer pepid2, String pepSeq1, String pepSeq2, int peplen1, int peplen2, int site1, int site2, boolean isDecoy1, boolean isDecoy2, int charge, double score, Integer protid1, String accession1, String description1, Integer protid2, String accession2, String description2, int pepPosition1, int pepPosition2, String Protein1Sequence, String Protein2Sequence, double scoreRatio, boolean isSpecialCase, String crosslinker, String run, String Scan) {
public PSM addMatch(String psmID, Long pepid1, Long pepid2, String pepSeq1, String pepSeq2, int peplen1, int peplen2, int site1, int site2, boolean isDecoy1, boolean isDecoy2, int charge, double score, Long protid1, String accession1, String description1, Long protid2, String accession2, String description2, int pepPosition1, int pepPosition2, String Protein1Sequence, String Protein2Sequence, double scoreRatio, boolean isSpecialCase, String crosslinker, String run, String Scan) {
// public PSM addMatch(String pepSeq2, String pepSeq1, String accession1, String accession2, int protid1, String description2, boolean isDecoy1, int pepid1, int pepPosition1, int peplen1, int protid2, boolean isDecoy2, int pepid2, int pepPosition2, int peplen2, String psmID, int site1, int site2, int charge, double score, double scoreRatio, boolean isSpecialCase) {
boolean linear = pepSeq2 == null || pepSeq2.isEmpty() || pepSeq1 == null || pepSeq1.isEmpty();
boolean internal = (!linear) && (accession1.contentEquals(accession2) || ("REV_"+accession1).contentEquals(accession2) || accession1.contentEquals("REV_"+accession2));
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/rappsilber/fdr/entities/Peptide.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class Peptide extends AbstractFDRElement<Peptide> { //implements Compara
private HashMap<Protein,IntArrayList> m_positions = new HashMap<Protein, IntArrayList>();
//int posSize = 0;
/** unique ID for this peptide */
private int id;
private long id;
/** assigned FDR for this peptide */
public double m_fdr = -1;
/** mass of this peptide */
Expand All @@ -66,7 +66,7 @@ public class Peptide extends AbstractFDRElement<Peptide> { //implements Compara
* @param pos position in the protein
* @param length the length of the peptide
*/
public Peptide(int id, String sequence, boolean isDecoy, Protein protein, int pos, int length) {
public Peptide(long id, String sequence, boolean isDecoy, Protein protein, int pos, int length) {
this(id, sequence, isDecoy, new Protein[]{protein}, new int[]{pos}, length);
}

Expand All @@ -82,7 +82,7 @@ public Peptide(int id, String sequence, boolean isDecoy, Protein protein, int po
* @param pos positions within the proteins
* @param length the length of the peptide
*/
public Peptide(int id, String sequence, boolean isDecoy, Protein[] protein, int[] pos, int length) {
public Peptide(long id, String sequence, boolean isDecoy, Protein[] protein, int[] pos, int length) {
this.sequence = sequence;
this.isDecoy = isDecoy;
this.length = length;
Expand Down Expand Up @@ -512,14 +512,14 @@ public int getSites() {
/**
* @return the unique peptide id
*/
public int getId() {
public long getId() {
return id;
}

/**
* @param id the peptide-id
*/
public void setId(int id) {
public void setId(long id) {
this.id = id;
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/rappsilber/fdr/entities/Protein.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @author lfischer
*/
public class Protein extends AbstractFDRElement<Protein> {//implements Comparable<Protein> {
private int id;
private long id;
private String accession;
private String description;
private String sequence="";
Expand Down Expand Up @@ -59,7 +59,7 @@ public class Protein extends AbstractFDRElement<Protein> {//implements Comparabl
* @param internal
* @param between
*/
public Protein(int id, String accession, String description, boolean isDecoy, boolean linear, boolean internal, boolean between) {
public Protein(long id, String accession, String description, boolean isDecoy, boolean linear, boolean internal, boolean between) {
this.id = id;
// at some points we consider decoy and non decoy proteins the same. So
// both get the same accession to make my life easier
Expand Down Expand Up @@ -175,7 +175,7 @@ public int compareDecoyUnAware(Protein p) {
/**
* @return the id
*/
public int getId() {
public long getId() {
return id;
}

Expand Down

0 comments on commit 808efb3

Please sign in to comment.